https://github.com/nitschmann/sinatra_json_api
Demo app for a simple JSON REST Api with Sinatra
https://github.com/nitschmann/sinatra_json_api
Last synced: 6 months ago
JSON representation
Demo app for a simple JSON REST Api with Sinatra
- Host: GitHub
- URL: https://github.com/nitschmann/sinatra_json_api
- Owner: nitschmann
- License: mit
- Created: 2014-12-08T15:07:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-15T10:47:57.000Z (over 11 years ago)
- Last Synced: 2024-04-22T03:59:12.510Z (about 2 years ago)
- Language: Ruby
- Homepage:
- Size: 164 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sinatra_json_api
===============
This app is a little example of an RESTful API with JSON interface built with the Ruby DSL framework [Sinatra](http://www.sinatrarb.com/).
It was created during a project at the Hochschule für Technik und Wirtschaft (HTW) Berlin.
============================
## Technologies
The app uses different frameworks and technologies to provide the API.
* [DataMapper](http://datamapper.org/) with a small [SQLite3](http://sqlite.org/) database as storage
* [Sinatra](http://www.sinatrarb.com/) framework for the DSL
* [Rake tasks](http://wiki.ruby-portal.de/Rake) for different CLI commands
* [Capistrano](http://capistranorb.com/) for Deployments
============================
## Requirements
* Ruby version ``` 2.1.3 ```
============================
## Installation
1. Install the ` bundler ` Gem with ` gem install bundler `
2. Run ` bundle install ` to install all required Gems
3. Exectute ` rake db:create ` to create the apps' SQLite3 database
4. Execute ` rake app:create:config ` to generate the ` config.yml ` file
5. (optional) Run ` rake app:create:token ` to generate an auth token for the app
============================
## Usage
Check ` app.rb ` for the routes and other details.
To start and test the app locally run ` rackup ` and point your browser to ` http://localhost:9292 `
============================
## License
> Copyright (c) 2014 Florian Nitschmann (s0544677@htw-berlin.de)