-
Notifications
You must be signed in to change notification settings - Fork 18
How to create a webserver to make bot online 24 7 using uptime robot
BlackKnight683 edited this page Feb 23, 2021
·
1 revision
const keepAlive = require('./alive.js');
keepAlive();
const express = require('express');
const server = express();
server.all('/', (req, res)=>{
res.send('Your bot is alive!')
})
function keepAlive(){
server.listen(3000, ()=>{console.log("Server is Ready!")});
}
module.exports = keepAlive;
- put the first code on top of index.js and the second code above where your client logins
- then create a new file called
alive.js
and put the alive.js file code in there :D
- Go to Uptime Robot's Website and create a new monitor monitoring the address of the web server you created on repl.it