- Run this command somewhere, it will make two files
localhost.key&localhost.crt
openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt- At the root of your project, create a
certificatesfolder and move those two files into it. - Also at the root of your project create a file called
server.jsgive it the following
const { createServer } = require('https');
const { parse } = require('url');