Skip to content

A basic sinatra application with a few pre-installed components: sprockets, backbone.js, slim, eco, zepto.js, and sinatra-reloader

Notifications You must be signed in to change notification settings

wulftone/sinatra-sprockets-slim-backbone-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sinatra + Sprockets + Slim + Sinatra-reloader Example

Credit comes from https://github.com/jch/sinatra-sprockets/ for the initial inspiration to get this thing working.

Setup

git clone git://github.com/wulftone/sinatra-sprockets-slim.git
cd sinatra-sprockets-slim
bundle install
bundle exec thin start
firefox localhost:3000

It should work with both ruby 1.9.3 and ruby 2.0.0.

Heroku deployment

When deploying to heroku, make sure you use the --stack cedar switch, or else it will complain about no javascript runtime:

heroku create my_app --stack cedar

Explanation

I wanted a simple way to get a backbone.js application up and running quickly, so I made this thing!

Basically, it's the barest-of-bones version with embedded examples that you should overwrite to get started. It has the following stuffs:

app.rb is a Sinatra application that is served from /

config.ru sets up a rackable Sprockets::Environment instance with assets/javascripts, assets/stylesheets, and assets/templates added to the load path. This endpoint is mounted at /assets.

About

A basic sinatra application with a few pre-installed components: sprockets, backbone.js, slim, eco, zepto.js, and sinatra-reloader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published