2021-08-09 06:49:37 +01:00
|
|
|
let http = require("http");
|
|
|
|
let options = {
|
|
|
|
host: "localhost",
|
|
|
|
port: "3001",
|
|
|
|
timeout: 2000,
|
2021-07-17 15:37:35 +01:00
|
|
|
};
|
2021-08-09 06:49:37 +01:00
|
|
|
let request = http.request(options, (res) => {
|
|
|
|
console.log(`STATUS: ${res.statusCode}`);
|
|
|
|
if (res.statusCode == 200) {
|
|
|
|
process.exit(0);
|
|
|
|
} else {
|
|
|
|
process.exit(1);
|
|
|
|
}
|
2021-07-17 15:37:35 +01:00
|
|
|
});
|
|
|
|
request.on("error", function (err) {
|
2021-08-09 06:49:37 +01:00
|
|
|
console.log("ERROR");
|
|
|
|
process.exit(1);
|
2021-07-17 15:37:35 +01:00
|
|
|
});
|
|
|
|
request.end();
|