X Tutup
Skip to content

Latest commit

 

History

History

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
X Tutup