mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-12 18:32:44 +00:00
24 lines
384 B
JavaScript
24 lines
384 B
JavaScript
const http = require("http");
|
|
const config = require("./config");
|
|
|
|
const options = {
|
|
host: "localhost",
|
|
port: config.PORT,
|
|
timeout: 2000,
|
|
};
|
|
|
|
const request = http.request(options, (res) => {
|
|
if (res.statusCode == 200) {
|
|
process.exit(0);
|
|
} else {
|
|
process.exit(1);
|
|
}
|
|
});
|
|
|
|
request.on("error", (err) => {
|
|
console.log("ERROR");
|
|
process.exit(1);
|
|
});
|
|
|
|
request.end();
|