Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shiffman/sinatra-comment-form
Basic form to enter comments about projects during class
https://github.com/shiffman/sinatra-comment-form
Last synced: 26 days ago
JSON representation
Basic form to enter comments about projects during class
- Host: GitHub
- URL: https://github.com/shiffman/sinatra-comment-form
- Owner: shiffman
- Created: 2013-05-07T02:37:38.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-05-08T21:08:06.000Z (over 11 years ago)
- Last Synced: 2024-04-16T08:56:38.303Z (7 months ago)
- Language: Ruby
- Size: 113 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Sinatra-Heroku Template
#### _A template to quickly get [Sinatra](http://sinatrarb.com) apps running and served up on [Heroku](http://heroku.com)._
## Installation
First be sure to have Ruby installed. Then download this template, `cd` to it, and install the gems
$ bundle install --without production
THen install postgres.app and follow the instructions to set up a database for the app.
To run the app locally, install Shotgun and run
$ shotgun
Your app should then be running at `http://localhost:9393`.
## Heroku App Creation
Heroku relies on [Git](http://devcenter.heroku.com/articles/git) for deploying apps so initialize git for the app.
$ git init
$ git add .
$ git commit -m "Initial Commit"To create a Heroku app, first be sure you are [signed up](https://api.heroku.com/signup). Then type the following in Terminal while inside of the project directory.
$ heroku create NAME_OF_YOUR_APP
Once this returns successfully, push your app to Heroku.
$ git push heroku master
## Heroku Database Creation
If you're using DataMapper with a database, you will need to add a database. Run these commands from the root of your project, replacing the name of the database in the last command with the name that is given to you after running the first command.
$ heroku addons:add heroku-postgresql:dev
$ heroku pg:promote HEROKU_POSTGRESQL_REPLACEME_URLNow you've created your database. Now you need to update the tables:
$ heroku run console
$ require './app.rb'
$ DataMapper.auto_upgrade!
$ exitThat's it! You're ready to see your website on yourappname.herokuapp.com