UNPKG

thenavisapp

Version:

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

14 lines (11 loc) 433 B
import type {AddressInfo} from 'node:net'; import https from 'node:https'; // @ts-expect-error No types import createCert from 'create-cert'; const keys = await createCert({days: 365, commonName: 'localhost'}); const server = https.createServer(keys, (_request, response) => { response.end('ok'); }).listen(8080, () => { const {port} = server.address() as AddressInfo; console.log(`Listening at https://localhost:${port}`); });