Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 872 Bytes

README.md

File metadata and controls

37 lines (30 loc) · 872 Bytes

Sinatra "Hello World" Example

  1. Install locally

    # get the code
    git clone https://github.com/cuny-nytech/sinatra-example.git
    # go into the project folder
    cd sinatra-example
    # install the dependencies listed in the Gemfile
    bundle
  2. Run locally

    # start Rack (which runs config.ru)
    bundle exec rackup
    # open the page
    open http://localhost:9292/hi
  3. Install Heroku Toolbelt

  4. Deploy to Heroku

    # create the app on Heroku
    heroku create
    # send latest code to Heroku
    git push -u heroku master
    # get "Web URL" of Heroku app
    heroku apps:info
    # open the page, using hostname printed by previous command
    open http://SOMETHING.herokuapp.com/hi

See the example at http://cuny-sinatra-example.herokuapp.com/hi.