You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
409 B
20 lines
409 B
let http = require("http");
|
|
let options = {
|
|
host: "localhost",
|
|
port: "3001",
|
|
timeout: 2000,
|
|
};
|
|
let request = http.request(options, (res) => {
|
|
console.log(`STATUS: ${res.statusCode}`);
|
|
if (res.statusCode == 200) {
|
|
process.exit(0);
|
|
} else {
|
|
process.exit(1);
|
|
}
|
|
});
|
|
request.on("error", function (err) {
|
|
console.log("ERROR");
|
|
process.exit(1);
|
|
});
|
|
request.end();
|