https://github.com/motdotla/sinatra-heroku-cedar-template
Sinatra Heroku Cedar Template - The bare minimum for a sinatra app on cedar, running thin, and using bundler.
https://github.com/motdotla/sinatra-heroku-cedar-template
Last synced: 4 months ago
JSON representation
Sinatra Heroku Cedar Template - The bare minimum for a sinatra app on cedar, running thin, and using bundler.
- Host: GitHub
- URL: https://github.com/motdotla/sinatra-heroku-cedar-template
- Owner: motdotla
- Created: 2012-01-13T09:15:47.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-08-20T18:57:09.000Z (about 11 years ago)
- Last Synced: 2025-04-11T03:11:42.598Z (6 months ago)
- Language: Ruby
- Homepage:
- Size: 169 KB
- Stars: 25
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sinatra Heroku Cedar Template

The bare minimum for a sinatra app on cedar, running rack, and using bundler.
## Putting it up on Heroku
Deploy to Heroku by clicking this button.
[](https://heroku.com/deploy)
## Running it locally
```
$ git clone git://github.com/scottmotte/sinatra-heroku-cedar-template.git
$ gem install bundler
$ bundle
$ bundle exec foreman start
```Navigate to localhost:5000 | 5100
## Add Coffeescript and Sass (Optional)
Add the gems to the Gemfile just below sinatra:
```
gem 'sinatra'
gem 'coffee-script'
gem 'sass'
```Run bundler:
```
$ bundle
```Create directories for your assets:
```
$ mkdir views views/javascripts views/stylesheets
```Require and assign the processors to your asset directories:
```
require 'coffee-script'
require 'sass'get '/javascripts/:script.js' do |script|
coffee :"javascripts/#{script}"
endget '/stylesheets/:stylesheet.css' do |stylesheet|
scss :"stylesheets/#{stylesheet}"
end
```Restart your app and use your asset directories as normal.
ie. views/javascripts/test.coffee and views/stylesheets/test.css