Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucasdavila/sinatra-bootstrap
A sinatra bootstrap app ready to go, with common gems, initialisers, etc...
https://github.com/lucasdavila/sinatra-bootstrap
Last synced: 3 months ago
JSON representation
A sinatra bootstrap app ready to go, with common gems, initialisers, etc...
- Host: GitHub
- URL: https://github.com/lucasdavila/sinatra-bootstrap
- Owner: lucasdavila
- License: lgpl-3.0
- Created: 2015-06-21T17:32:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-13T12:43:08.000Z (almost 9 years ago)
- Last Synced: 2024-04-17T03:20:59.428Z (7 months ago)
- Language: Ruby
- Size: 148 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a sinatra bootstrat app ready to implement a json api or a frontend app.
# Features:
* Ready to use Active Record.
* Ready to implement JSON APIs.
* Ready to test with Rspec (it also includes shoulda-matchers, database_cleaner and factory_girl).
* Ready to deploy with capistrano.# Rake tasks
It includes some useful tasks, such:
* database tasks:
* db:create
* db:destroy
* db:generate_migration NAME=create_pets
* db:migrate
* db:rollback* console
# Deploy tasks
It includes some useful capistrano tasks, such:
* database tasks:
* db:create
* db:destroy
* db:migrate
* db:rollback
* db:seed* upload tasks:
* upload:db_config
* upload:vhost## First steps
### create your custom configs
`$ cp config/database.sample.yml config/database.yml`## Test
### setup the database
`$ rake RACK_ENV=test db:create`
`$ rake RACK_ENV=test db:migrate`### run the tests
`$ rspec`## Development
### setup the database
`$ rake db:create`
`$ rake db:migrate`### run the console
`$ rake console`### run the app with
`$ rackup`## Production
### create your custom deploy config
`$ cp config/deploy/production.sample.conf config/deploy/production.conf`
`$ cp config/deploy/staging.sample.conf config/deploy/staging.conf`### create your custom apache virtual host
`$ cp config/apache.sample.conf config/apache.conf`### upload your custom virtual host
`$ cap production upload:vhost`### upload your custom configs
`$ cap production upload:db_config`### deploy it
`$ cap production deploy`### setup the database
`$ cap production db:create`
`$ cap production db:migrate`Yay, your app is online :D
## TODO
* Move resource_controller to a sinatra module?