Fixed web_server example to be compatible with Node v0.1.30

This commit is contained in:
Jason Huggins 2010-02-25 17:42:05 -06:00
parent 10d335ccb1
commit 6bc61ec1a1
1 changed files with 3 additions and 3 deletions

View File

@ -4,9 +4,9 @@ http: require 'http'
server: http.createServer (req, res) ->
res.sendHeader 200, {'Content-Type': 'text/plain'}
res.sendBody 'Hello, World!'
res.finish()
res.write 'Hello, World!'
res.close()
server.listen 3000
puts "Server running at http://localhost:3000/"
puts "Server running at http://localhost:3000/"