Update healthcheck to work with PORT variable

This commit is contained in:
Alex 2022-09-05 22:55:14 +01:00
parent fb845c3e03
commit 36d1a9c738
2 changed files with 8 additions and 4 deletions

View file

@ -1,7 +1,10 @@
var http = require("http");
const PORT = process.env.PORT || "3000";
var options = {
host: "localhost",
port: "3000",
port: PORT,
timeout: 2000,
};
var request = http.request(options, (res) => {
@ -16,4 +19,4 @@ request.on("error", function (err) {
console.log("ERROR");
process.exit(1);
});
request.end();
request.end();