2010-02-14 23:20:53 -05:00
|
|
|
# Contributed by Jason Huggins
|
|
|
|
|
2010-07-29 00:17:48 -04:00
|
|
|
sys = require 'sys'
|
|
|
|
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'
|
2010-02-25 18:42:05 -05:00
|
|
|
res.write 'Hello, World!'
|
2010-04-10 18:05:35 -04:00
|
|
|
res.end()
|
2010-02-14 23:20:53 -05:00
|
|
|
|
|
|
|
server.listen 3000
|
|
|
|
|
2010-03-16 01:53:25 -04:00
|
|
|
sys.puts "Server running at http://localhost:3000/"
|