Last active
December 22, 2015 01:39
-
-
Save makotot/6397903 to your computer and use it in GitHub Desktop.
heroku sinatra development
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require './main' | |
| run Sinatra::Application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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