Ask coding questions

← Back to all posts
Anyone using repl.it as a node express server?
JohnJoel (5)

I love using repl.it for creating node express server but I'm having the following problems:

  1. At one point it cannot start, saying port 3000 is already in use and there is no way to kill it. What I do is duplicate the repl and go from there :/

  2. My server goes down after some time so I want to ask if there's a good reliable host for my node server

Thanks!

Answered by vedprad1 (744) [earned 5 cycles]
View Answer
Commentshotnewtop
vedprad1 (744)

For the first issue, just change the port number, then wait for a while (I would recommend refreshing the page, too) and then revert to the original port number.

For the second issue, use UptimeRobot: https://repl.it/talk/ask/Express-Server-Timeout/13054.

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

JohnJoel (5)

@vedprad1 cool! thanks a lot dude

TheDrone7 (609)

As for issue 1, try not passing any port number to allow it to use any available ports. You can also fork your repl and run the new one after deleting the old one to kill the process.

As for the second issue, you would need to set up a pinging service such as uptimerobot or https://portal.kognise.dev/ping which send an http request to your server at fixed intervals, be sure to keep the interval below 30 minutes. I also showed how to setup uptimerobot in this tutorial.