Skip to content

Instantly share code, notes, and snippets.

@akidee
Created May 19, 2011 21:03
Show Gist options
  • Save akidee/981737 to your computer and use it in GitHub Desktop.
Save akidee/981737 to your computer and use it in GitHub Desktop.
connect = require('connect')
s = connect.createServer()
s.use('/', function (req, res) {
res.writeHead(200)
res.end('Okay!')
}).listen(3000)
process.on('exit', function () {
console.log('Stop server')
s.close()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment