Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

114
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda