#How to start server on HTTPS?

11 messages · Page 1 of 1 (latest)

plush mural
#

On my managed webhost, I am running HTTPS=true npm run start but the server is starting on http://localhost:3000. Anyone know how to start this on HTTPS?

wispy crestBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

karmic frigate
plush mural
#

Thanks @karmic frigate , do you have any pointers on how to set this up? Also what is the best way to keep the nextJS app running? Should I use npm forever ?

karmic frigate
plush mural
#

On a production server where I need 24/7 uptime, I won't be able to keep the terminal up..

karmic frigate
plush mural
#

Yep, I have an external server and I have the code on there. I just can't figure out how to run it on HTTPS and how to keep the server running on port 3000 forever

karmic frigate
# plush mural Yep, I have an external server and I have the code on there. I just can't figure...

you server should be available via an ip address (vercel for example is available at 76.76.21.21). So go in your DNS configuration and add your record to it, that redirects the user from example.com to your ip (cname, so the user dont see the ip). The user then can go to http://example.com and will access your server, on which nextjs is running, so the end customer will reach your page. Now you add an SSL certificate to it and then your page is reachable via https://example.com 👍

#

Btw: even vercel is using a third party to make domains available (cloudflare is also in the background=:

plush mural