Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omgbbqhaxx/426e57cbc90041cb7b951ac5a4d14cbb to your computer and use it in GitHub Desktop.
Save omgbbqhaxx/426e57cbc90041cb7b951ac5a4d14cbb to your computer and use it in GitHub Desktop.
how to generate ssl certificate on macbook instantly for node.js
openssl req -newkey rsa:2048 -new -nodes -keyout key.pem -out csr.pem
openssl x509 -req -days 365 -in csr.pem -signkey key.pem -out server.crt
var options = {
key: fs.readFileSync('./key.pem', 'utf8'),
cert: fs.readFileSync('./server.crt', 'utf8')
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment