Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…e to come...
  • Loading branch information...
commit 03ae3bd7223e56fce70d21a7ea546e932280e6b4 1 parent e3eb87c
Tim Caswell authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 hello_world.js
7 hello_world.js
View
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.