Skip to content

Commit

Permalink
updated README to use 'with' and fab.listen.
Browse files Browse the repository at this point in the history
  • Loading branch information
jed committed Apr 24, 2010
1 parent f0a5dde commit d7736e9
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@

Here's an example of a "hello world" app:

fab = require( "../" );
with ( fab = require( "fab" ) ) fab

require( "http" ).createServer( fab
( listen( 0xFAB ) )

( /^\/hello/ )
( fab.tmpl, "Hello, <%= this[ 0 ] %>!" )
( /^\/hello/ )

( /^\/(\w+)$/ )
( fab.capture )
( [ "world" ] )
( 404 )
( tmpl, "Hello, <%= this[ 0 ] %>!" )

( /^\/(\w+)$/ )
( capture )
( [ "world" ] )

).listen( 0xFAB );
( 404 );

See [more examples](http://github.com/jed/fab/tree/master/examples/), learn how to [make your own apps](http://wiki.github.com/jed/fab/fab-app-specification), or see the [apps that (fab) provides for you](http://wiki.github.com/jed/fab/built-in-fab-apps).

0 comments on commit d7736e9

Please sign in to comment.