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
2010-02-14 23:20:53 -05:00

12 lines
No EOL
261 B
CoffeeScript

# Contributed by Jason Huggins
http: require 'http'
server: http.createServer (req, res) ->
res.sendHeader 200, {'Content-Type': 'text/plain'}
res.sendBody 'Hello, World!'
res.finish()
server.listen 3000
puts "Server running at http://localhost:3000/"