The API is developed using:
• The Ruby framework: Sinatra.
• ORM: Active Record.
• Database: SQLite (Dev) // PostgreSQL (Prod).
This file contains the start point of the application and here we put all the endpoints of the API.
Contains all the setup files (For example: The DB connection files).
Contains all the Model Classes of the WeGo app. ( *.rb ). These files are required by the app.rb .
Contains all the view files (*.erb or using a similar template).
Contains all the Rake tasks (You can see the tasks using: $ bundle exec rake -T like migrations of the DB).
Contains all the static files of Sinatra like stylesheets, images, javascripts.
The ORM is ActiveRecord. For more info: https://github.com/rails/rails/tree/master/activerecord
Quick Guide: http://guides.rubyonrails.org/index.html
Provides the tasks for the ORM interaction, the DB creations, migrations.
Install the Gemfile and dependencies:
• bundle install.
In order to run the API:
• bundle exec rackup.
Run the tests:
• bundle exec rake.
• Run single test: bundle exec rake test/<test_unit_name.rb>