How to deploy a nodeJS webserver repl using replit deployments

I am a veteran Replit user but I can’t get Deployments working for me.

I want to deploy NodeJS repls which host webservers.

How do I do this? Step-by-step instructions would be nice.

Don’t just quote docs at me please. I’ve read all the deployment docs twice.
None of it worked for me. If you want to hear about what happened when I tried, read my last ask post which received no responses, but otherwise I look forward to hearing from anyone.

1 Like

The only thing I would check is 1: are there any errors when you run your program (and I’m assuming not), 2: is the port your listening to the same as the port you configured in the deployment and 3: is your deployment using the run command node index.js?

Also make sure you’re not serving a 502 status at all (if you are you might just be accidentally serving 502).

If all of that is fine, it’s probably an issue with Replit (which I suspect it is), and the only thing you can do is wait for the Replit team to get to the bottom of it :slight_smile:

1 Like

As described in the linked post, there are no errors in my program, and it runs and hosts just fine in the editor, via the webview, and on the subdomain. Deploying and visiting on doesn’t work though. Deployment command is npm run test which is proxied to node index.js in the config

Serving a 502 status is the first thing I checked. While it wouldn’t make any sense for me to intentionally serve a 502 status from the webserver, I still checked to confirm that my code was not doing this. And it wasn’t.

Any advice on how to get Replit’s attention?

1 Like

Just to be sure, try just having the run command asa node index.js instead of redirecting to the tests and then running it through the tests. There’s a chance that could be causing issues :man_shrugging:

1 Like

Just closing the loop here, I’ve responded on your linked post. I think we can close this as a duplicate unless there are any other repls you need help with?