A small starting point for a Sinatra app. Good for prototyping.
- Live Reload
- Sass + Compass
- CoffeeScript
- Slim / Erb
- Clone the repo
cdinto repo and runbundle- Run
ruby app.rb - In a new terminal tab or window run
guard - Make sure you have the Live Reload Browser Extension
- Activate the extension by clicking the button in your browser while at your projects URL (
0.0.0.0:4567or can be changed inapp.rb) - Get prototyping!!!
Quasar uses layouts by default now. In app.rb you can specify if the view should be rendered using a layout:
# Routes
get '/' do
@content = data["content"]
# Using default layout
slim :view_name
# Using a specific layout
slim :view_name, :layout => :layout_view_name
# Using no layout
slim :view_name, :layout => false
end- To deploy to heroku, have the toolbelt installed
- run
heroku create APPNAMEmore info on heroku - run
git push heroku master, if pushing a branch that's not mastergit push heroku localbranchname:master - open browser and see if it worked, if there are errors, make sure you ran bundle and commited with
Gemfile.lockchecked-in.