1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
jashkenas--coffeescript/examples/web_server.coffee

13 lines
264 B
CoffeeScript
Raw Normal View History

2010-02-14 23:20:53 -05:00
# Contributed by Jason Huggins
2010-07-29 00:17:48 -04:00
http = require 'http'
2010-02-14 23:20:53 -05:00
2010-07-29 00:17:48 -04:00
server = http.createServer (req, res) ->
res.writeHeader 200, 'Content-Type': 'text/plain'
res.write 'Hello, World!'
res.end()
2010-02-14 23:20:53 -05:00
server.listen 3000
console.log "Server running at http://localhost:3000/"