Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
JavaScript discord bot keeps going offline with keep alive

I have a Javascript discord bot, and it is getting bigger and bigger, the problem is that every time I close my replit. In about 30 minutes my bot just goes offline. I use this code in my keep_alive.js file


http.createServer(function (req, res) {
  res.write("Online:)");
  res.end();
}).listen(8080);```

//I have this in index.js: `const keep_alive = require('./keep_alive.js')`

 
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

The best solution that I have found and use (and it is free) is pm2. It requires no code in your file at all

https://pm2.keymetrics.io/

npm i pm2 -g

// navigate to the folder with your main bot.js file (in this example it is called index.js)

pm2 start index.js

// followed by

pm2 save

// Optionally you can monitor the whole server as well with

pm2-server-monit

Comes with a free dashboard as well

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!