const express = require("express"); const app = express(); // http://expressjs.com/en/starter/static-files.html app.use(express.static("public")); // http://expressjs.com/en/starter/basic-routing.html app.get("/", function(request, response) { response.sendFile(__dirname + "/views/index.html"); }); // http://expressjs.com/en/starter/basic-routing.html app.get("/img", function(request, response) { response.sendFile(__dirname + "/views/index.html"); }); const listener = app.listen(process.env.PORT, function() { console.log("Your app is listening on port " + listener.address().port); }); process.on("SIGTERM", function () { console.log("SIGTERM received, sending SOS to Resurrect..."); require('https').get("https://resurrect.glitch.me/"+process.env.PROJECT_DOMAIN+"", process.exit) });