Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
UnderRack is just a Ruby Framework for you understand Rack
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
README.rdoc
Rakefile
under_rack.gemspec

README.rdoc

UnderRack

A simple Ruby Framework for you understand Rack(Ruby Webserver Interface)

Example

  • gem install under_rack

  • create a new file called app.ru with:

    require "rubygems"
    require "under_rack"
    
    get "/hello" do
      @name = "Mary"
      erb :hello
    end
    
    post "/create" do
      "Created"
    end
    
    app_root = get "/" do
     "Home"
    end
    
    run app_root
  • Create a new file called hello.erb with:

    <p>Hello <%= @name %></p>
  • Run the application with: rackup app.ru

  • Go to localhost:9292/hello

Something went wrong with that request. Please try again.