Skip to content
Browse files

playing with textiles spacing

Signed-off-by: Daniel Neighman <has.sox@gmail.com>
  • Loading branch information...
1 parent c2565c5 commit ff528fab35efd0679c37f98aab6127f24bf7c22b @glenndavy glenndavy committed with hassox Jul 26, 2009
Showing with 3 additions and 8 deletions.
  1. +3 −8 README.textile
View
11 README.textile
@@ -58,6 +58,7 @@ Content-Length: 9
</pre>
You should see 'NOT FOUND' in your browser window and something like this appear in your rackup console window.
+
<pre>
127.0.0.1 - - [26/Jul/2009 15:42:55] "GET / HTTP/1.1" 404 9 0.0011
</pre>
@@ -67,34 +68,28 @@ That 404 is good news! The stack is running.. we just haven't cooked any pancake
h4. Routing
Edit config/router.rb with:
-
<pre>
home = lambda {|e| [200,{"Content-Type" => "text/plain", "Content-Length" => "12"}, "Welcome home" ]}
YummyApp.add_routes do |r|
r.map "/", :to => home
end
</pre>
-
Now, restart the server (^C) and try again:
<pre>
$rackup config.ru
thor:bug_report glenn$ rackup config.ru
Loading Development Environment
</pre>
-
Reload you page and you should see "Welcome home".
-
And, in your console window, rack should log the request like so:
-
<pre>
127.0.0.1 - - [26/Jul/2009 16:16:23] "GET / HTTP/1.1" 200 12 0.0012
127.0.0.1 - - [26/Jul/2009 16:16:23] "GET /favicon.ico HTTP/1.1" 200 12 0.0012
-<pre>
-
+</pre>
h4. Whats next:
Well we don't want to be writing our apps as lambdas jemmied into the router, instead next we start to build stacks, out of other middlewares... merbs, other pancake stacks, some sinatra, more rack ups or what ever.
-To be contd...
+To be continued...

0 comments on commit ff528fa

Please sign in to comment.
Something went wrong with that request. Please try again.