Commit 3512ff81 authored by Eduardo L. Buratti's avatar Eduardo L. Buratti
Browse files

Fix server exiting after initialization

parent 42d1905e
......@@ -38,18 +38,12 @@ ramlParser.loadFile("specs/blendb-api-v1.raml")
osprey.server(raml),
router);
if (!module.parent) {
let port = process.env.PORT || 3000;
app.listen(port);
if (app.get("env") === "development") {
console.log("Server listening on port " + port + ".");
}
}
else {
// signalize to the test suite that the server is ready to be tested
app.locals.ready = true;
}
},
(err: any) => {
console.error("RAML Parsing Error: " + err.message);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment