Headline

A micro Web-application framework written in Language:Ruby.

Illustration

Sinatra employs an embedded Domain-specific language to route and handle requests:

#!/usr/bin/env ruby
require 'sinatra'

# A static route
get '/' do
    return 'Hello, World!'
end

# A route with a parameter
get '/hello/:name' do
    name = params[:name]
    return "Hello, #{name}!"
end

When visiting this server's root page, it will show "Hello, world!". When visiting a URL like "/hello/Human", it will pattern-match the route and display "Hello, Human!".

Metadata

Language:Ruby http://www.sinatrarb.com/ http://en.wikipedia.org/wiki/Sinatra_%28software%29 Web-application_framework External DSL


There are no revisions for this page.

User contributions

    This user never has never made submissions.

    User edits

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.

    10 most similar pages:

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.