Skip to content

Instantly share code, notes, and snippets.

@makotot
Last active December 22, 2015 01:39
Show Gist options
  • Select an option

  • Save makotot/6397903 to your computer and use it in GitHub Desktop.

Select an option

Save makotot/6397903 to your computer and use it in GitHub Desktop.
heroku sinatra development
require './main'
run Sinatra::Application
source "https://rubygems.org"
gem "sinatra"
gem "sinatra-contrib"
gem "haml"
gem 'haml-coderay'
$ mkdir project
$ cd project
$ bundle install
$ npm install --save-dev
$ foreman start
# coding: utf-8
require 'sinatra'
require 'sinatra/base'
require 'sinatra/reloader' if development?
require 'haml'
require 'haml-coderay'
Haml::Filters::CodeRay.encoder_options = { :css => :class }
set :publec_folder, '/public'
get '/' do
haml :index
end
not_found do
'404'
end
web: bundle exec rackup config.ru -p $PORT
grunt: grunt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment