Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
New stop support
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Nov 7, 2019
1 parent 93b8b7d commit f0346af
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,16 @@ app.all("*", (req, res, next) => {

(async () => {
await lib.start();
app.listen(lib.conf.PORT, lib.conf.HOST, () => {
try {
util.Logging.info("Listening on " + lib.conf.HOST + ":" + String(lib.conf.PORT));
lib.init();
} catch (err) {
util.Logging.error(err);
}
});
try {
app.listen(lib.conf.PORT, lib.conf.HOST, () => {
try {
util.Logging.info("Listening on " + lib.conf.HOST + ":" + String(lib.conf.PORT));
lib.init();
} catch (err) {
util.Logging.error(err);
}
});
} finally {
await lib.stop();
}
})();

0 comments on commit f0346af

Please sign in to comment.