Permalink
Browse files

add modular style example

  • Loading branch information...
1 parent 487550a commit b5298ef7d4d01dc0c1555d4e879d867514eb36f3 @stevenwilkin committed Mar 26, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 02_basic/02_modular_style.md
@@ -0,0 +1,26 @@
+!SLIDE
+
+# Modular style
+
+ @@@ ruby
+ # 02_modular_style.ru
+ require 'sinatra/base'
+
+ class BelfastRuby < Sinatra::Base
+ get '/' do
+ "'Bout ye"
+ end
+ end
+
+ run BelfastRuby
+
+
+!SLIDE
+
+# Launch with Rackup
+
+ $ rackup ./02_modular_style.ru
+ >> Listening on 0.0.0.0:9292
+
+ $ curl http://0.0.0.0:9292
+ 'Bout ye

0 comments on commit b5298ef

Please sign in to comment.