Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 19 lines (14 sloc) 0.251 kb
8438b505 »
2011-10-24 Should register Sinatra::Contrib
1 require 'sinatra/base'
a0296a86 »
2011-10-24 First commit
2 require 'sinatra/contrib'
3
4
2ccf71bf »
2011-10-24 Changing the name of the file to app.rb
5 class App < Sinatra::Base
8438b505 »
2011-10-24 Should register Sinatra::Contrib
6 register Sinatra::Contrib
a0296a86 »
2011-10-24 First commit
7
8 get '/' do
9 erb :home
10 end
24d17f28 »
2011-10-24 Added about.erb template and correct Github link
11
12 get '/about/' do
13 erb :about
14 end
2308308a »
2011-11-03 Add JSON example
15
16 get '/json' do
17 json :foo => 'bar', :code => 'america'
18 end
a0296a86 »
2011-10-24 First commit
19 end
Something went wrong with that request. Please try again.