Permalink
Browse files

Merge pull request #6 from mrienstra/patch-1

Fixed the "HTTP application" code sample for Director
  • Loading branch information...
pksunkara committed Feb 18, 2012
2 parents 1513274 + 5dcd22c commit d778b152d25a49d68802845188f583fd539f2684
Showing with 4 additions and 2 deletions.
  1. +4 −2 public/index.html
View
@@ -212,7 +212,7 @@ <h4>HTTP application</h4>
<div class="panel">
<pre class="syntax">
var flatiron = require('flatiron'),
- app = flatiron.app;
+ app = flatiron.app;
app.use(flatiron.plugins.http, {
// HTTP options
@@ -222,10 +222,12 @@ <h4>HTTP application</h4>
// 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);
</pre>
</div>

0 comments on commit d778b15

Please sign in to comment.