Last active
June 25, 2018 02:50
-
-
Save evaporei/44bd7c34f43a9bea70f3b4c308d641ed to your computer and use it in GitHub Desktop.
graceful-shutdown/express-without-graceful.js
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
const express = require('express') | |
const app = express() | |
app.get('/wait', (req, res) => { | |
console.log('Started wait!') | |
setTimeout(() => { | |
res.send('Done!') | |
console.log('Done!') | |
}, 10000) | |
}) | |
app.listen(8000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment