first draft booting with strapi, mongo, nginx

This commit is contained in:
2018-12-05 22:20:07 +01:00
commit b60a7508c7
11 changed files with 857 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
const http = require("http");
const options = {
host : "localhost",
port : "1337",
path: "/_health",
method: "HEAD",
timeout : 2000
};
const request = http.get(options, (res) => {
console.log(`STATUS: ${res.statusCode}`);
if (res.statusCode == 204) {
process.exit(0);
} else {
process.exit(1);
}
});
request.on('error', function(err) {
console.error(`ERROR: ${err.message}`);
process.exit(1);
});
request.end();