3 things to make a static Sinatra App and upload to Heroku
1) Create a file app.rb with this code:
require 'sinatra'
get '/' do
File.read(File.join('public', 'index.html'))
end
2) Create a Gemfile
source 'http://rubygems.org'
gem 'sinatra', '~> 1.3.2'
3) Create a config.ru
require "./app"
run Sinatra::Application
Then just create your Heroku app, commit and push.
Written by Juan Pujol
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#