Next.js Discord

Discord Forum

How can I make https in local development

Unanswered
Spectacled Caiman posted this in #help-forum
Open in Discord
Spectacled CaimanOP
I want my app to use https in local development can someone guide me please.

Thank you in advance

8 Replies

Spectacled CaimanOP
Hi thank you for the reply but I want custom domain in my local, like https://myapp.local I don't want to use https://localhost
African Slender-snouted Crocodile
brew install mkcert
mkcert -install
mkcert localhost
African Slender-snouted Crocodile
then update your dev command "dev": "next dev --turbopack --experimental-https",
I got it working on my local, let me know if you have any questions
@African Slender-snouted Crocodile brew install mkcert mkcert -install mkcert localhost
American Sable
he literally just said he doesnt want https just a way to change the domain
on localhost