Permalink
Browse files

Update the hello_world.js sample to update the latest api change. Mor…

…e to come...
  • Loading branch information...
1 parent e3eb87c commit 03ae3bd7223e56fce70d21a7ea546e932280e6b4 @creationix committed Mar 22, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 hello_world.js
View
7 hello_world.js
@@ -1,8 +1,7 @@
-var server = require('./node-router')
+var server = require('./lib/node-router').getServer();
-function hello(req, res, match) {
+server.get(new RegExp("^/(.*)$"), function hello(req, res, match) {
res.simpleHtml(200, "Hello " + (match || "World") + "!");
-}
+});
-server.get(new RegExp("^/(.*)$"), hello);
server.listen(8080);

0 comments on commit 03ae3bd

Please sign in to comment.