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