DEV Community 👩‍💻👨‍💻

Cover image for Enable HTTPS in LOCALHOST with OpenSSL for a NodeJS app🤓(with video)
Shahjada Talukdar for The Destro Dev Show

Posted on

Enable HTTPS in LOCALHOST with OpenSSL for a NodeJS app🤓(with video)

For different purposes, we might need to enable HTTPS in our LOCALHOST environment. In this video, I have tried to show how we can do that in few minutes. 🎯
Enjoy 🌸

/// Commands to generate certificate with OpenSSL ///

openssl genrsa -out key.pem
Enter fullscreen mode Exit fullscreen mode
openssl req -new -key key.pem -out csr.pem
Enter fullscreen mode Exit fullscreen mode
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
Enter fullscreen mode Exit fullscreen mode
rm csr.pem
Enter fullscreen mode Exit fullscreen mode

SUBSCRIBE to YouTube Channel - https://www.youtube.com/c/TheDestroDevShow?sub_confirmation=1
LIKE FB Page - https://www.facebook.com/the.destro.dev.show/
Follow on Twitter - https://twitter.com/destro_mas
Follow on DEV - https://dev.to/destro_mas

Made with ❤️ in Berlin!

Cheers!
👋

Top comments (2)

Collapse
tylerauerbeck profile image
Tyler Auerbeck

Another tool I find pretty useful when I just need some self signed certs is mkcert: github.com/FiloSottile/mkcert

Collapse
destro_mas profile image
Shahjada Talukdar Author

Thanks for sharing! 👋

🌚 Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.