Skip to content

Latest commit

聽

History

History
聽
聽

https

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
聽
聽
聽
聽
聽
聽

README.md

HTTPS example

Simple HTTPS server using tinyhttp and https module.

Setup

Generate the certificate key:

openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' \
  -keyout localhost-privkey.pem -out localhost-cert.pem

Install dependencies:

tinyhttp new https

Run

node index.js

and in another terminal:

curl https://localhost:3000 -k