If you ever tried to make HTTPS work in development, you know it's something you can lose your head over π€―.
How do you get that sweet green lock with Create React App β on localhost?
In this video, you'll learn how to setup HTTPS in development by creating your own SSL certificates and making sure the browser trusts them.
You only have to follow these steps once, and when you're done, you can reuse the SSL certificates throughout all of your projects.
π Links from video
mkcert - https://github.com/FiloSottile/mkcert
ππΌ Watch more videos like this one on my YouTube channel π₯
Write clean code. Stay ahead of the curve.
Every other Tuesday, I share tips on how to build robust Node.js applications. Join a community of developers committed to advancing their careers and gain the knowledge & skills you need to succeed.
Top comments (5)
Thank you. Can you create a video: "How to deploy react native app on Google Cloud and point a domain from GoDaddy to that IP" (https secure). I used nginx but it took port 80, someone says let's take nginx as reverse proxy?!
Wow awesome that cover video saved me a lot of googling time.
Why would you do this? Every browser API that requires a secure context works on localhost even without setting up HTTPS on it.
Biggest reason I had for this was testing CORS configuration. Too many posts on SO show how to "enable all origins", but that's really not the point.
There are many problems that this video solves.
Sometimes you want to use a custom domain for localhost testing but you don't want to use 'localhost'. In that case the API simply doesn't work and service worker also stops.