Project

under_rack

0.0
No commit activity in last 3 years
No release in over 3 years
UnderRack is a Ruby Framework for you understand Rack
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

= 1.4.1
 Project Readme

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