Skip to content

Instantly share code, notes, and snippets.

@alanhoff
Created June 24, 2016 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanhoff/2fa5f3cf107ccf0c05970a6c233dc85c to your computer and use it in GitHub Desktop.
Save alanhoff/2fa5f3cf107ccf0c05970a6c233dc85c to your computer and use it in GitHub Desktop.
'use strict'
let express = require('express')
let app = express()
function test () {
return typeof null === 'undefined'
}
let reqs = 0
app.get('/', (req, res) => {
reqs++
if(test()) {
console.error('Bugou na request %s', reqs)
process.exit(1)
}
res.send('ok')
})
app.listen(8080)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment