Created
March 20, 2013 12:51
-
-
Save mrvisser/5204396 to your computer and use it in GitHub Desktop.
This file contains 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
var express = require('express'); | |
var app = express(); | |
var emitter = new require('events').EventEmitter(); | |
app.get('/marco', function(req, res) { | |
res.send(200, 'Shut up'); | |
console.log('Marco!'); | |
setTimeout(_handlePolo, 10000); | |
}); | |
var server = app.listen(3000); | |
process.on('SIGINT', function() { | |
console.log('Got kill. Processing.'); | |
server.close(); | |
}); | |
var _handlePolo = function() { | |
console.log('polo'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment