Created
November 16, 2022 13:07
-
-
Save stefanocudini/d6e7e7a530e36d3c226335d553fed59c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function listenLog(app) { | |
console.log('listen paths', app._router.stack.filter(r => r.route).map(r => `${Object.keys(r.route.methods)[0]} ${r.route.path}`) ); | |
console.log(`listening at http://localhost:${this.address().port}`); | |
/* | |
//TODO manage sigterm | |
process.on('SIGTERM', () => { | |
console.error('[geocoder-pelias-services] closing...') | |
serverParser.close(); | |
});*/ | |
} | |
///example | |
const app = express = require('express')(); | |
app.listen(8080, listenLog(app)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment