Created
June 11, 2021 10:36
-
-
Save omgbbqhaxx/426e57cbc90041cb7b951ac5a4d14cbb to your computer and use it in GitHub Desktop.
how to generate ssl certificate on macbook instantly for node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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