Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

112
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda