const Discord = require('discord.js');
const bot = new Discord.Client();
const Manager = new Discord.ShardingManager('./index.js');
Manager.spawn(2);
const http = require('http');
const express = require('express');
const app = express();
app.use(express.static('public'));
app.get("/", function(request, response) {
response.sendFile(__dirname + '/views/index.html');
console.log(Date.now() + " Ping Received");
});
const listener = app.listen(process.env.PORT, function() {
setInterval(() => {
http.get(`http://${process.env.PROJECT_DOMAIN}.glitch.me/`);
}, 280000);
})
I saw a post about Gareth helping someone merge their express.js file and node.js application. Will this work? The first part starts 2 shards of my discord bot (node.js application) and 2nd part is the original express.js file (that also throws the request in the form of a very bad website).