Skip to content

Instantly share code, notes, and snippets.

@rxbynerd
Created April 20, 2012 14:25
Show Gist options
  • Save rxbynerd/2429046 to your computer and use it in GitHub Desktop.
Save rxbynerd/2429046 to your computer and use it in GitHub Desktop.

Revisions

  1. rxbynerd revised this gist Apr 20, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    This code is running [here](http://demonstration.rubynerd.net) until I accidentally Holly
  2. rxbynerd revised this gist Apr 20, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,2 @@
    thin:
    thin start --port 5075
    thin start --port 5075 --address 127.0.0.1
  3. rxbynerd revised this gist Apr 20, 2012. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions app.rb
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,9 @@
    # this is a dynamic route
    get "/" do
    "The time is " + Time.now.inspect
    end

    # this is a static route
    get "/james" do
    "i crashed it"
    end
  4. rxbynerd revised this gist Apr 20, 2012. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,2 @@
    thin:
    thin start --port 5075
    thin start --port 5075
    2 changes: 1 addition & 1 deletion config.ru
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    require "sinatra"
    require "./app.rb"

    run Sinatra::Application
    run Sinatra::Application
  5. rxbynerd created this gist Apr 20, 2012.
    2 changes: 2 additions & 0 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    thin:
    thin start --port 5075
    3 changes: 3 additions & 0 deletions app.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    get "/" do
    "The time is " + Time.now.inspect
    end
    4 changes: 4 additions & 0 deletions config.ru
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    require "sinatra"
    require "./app.rb"

    run Sinatra::Application