From 5dcd22c184d047fbda30318cd7e7db42842dff3d Mon Sep 17 00:00:00 2001 From: Michael Rienstra Date: Fri, 17 Feb 2012 13:32:56 -0800 Subject: [PATCH] Fixed the "HTTP application" code sample in the "URL Routing with Director" section. --- public/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 60f5870..bc725e1 100644 --- a/public/index.html +++ b/public/index.html @@ -212,7 +212,7 @@

HTTP application

   var flatiron = require('flatiron'),
-       app = flatiron.app;
+      app = flatiron.app;
   
   app.use(flatiron.plugins.http, {
     // HTTP options
@@ -222,10 +222,12 @@ 

HTTP application

// app.router is now available. app[HTTP-VERB] is also available // as a shortcut for creating routes // - app.get(/\/version/, function () { + app.router.get('/version', function () { this.res.writeHead(200, { 'Content-Type': 'text/plain' }) this.res.end('flatiron ' + flatiron.version); }); + + app.start(8080);