UnderRack is just a Ruby Framework for you understand Rack
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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