Guest User

Untitled

a guest
Dec 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. require 'sinatra'
  2.  
  3. # Main route - this is the form where we take the input
  4. get '/' do
  5. <<-HTML
  6. This is an example of simple routes.
  7. Check out <a href='/~irs221/sinatra/url_params/route/1'>route 1</a> or
  8. <a href='/~irs221/sinatra/url_params/route/2'>route 2</a> or
  9. <a href='/~irs221/sinatra/url_params/route/4032467'>route 4032467</a>!
  10. HTML
  11. end
  12.  
  13. get '/route/:id' do
  14. "This is route number #{params[:id]}!"
  15. end
Add Comment
Please, Sign In to add comment