- RESTful api.
- JSON response
- Api versioning.
- Exception Handling
- Authentication
- RSpec testing.
- API Request monitoring
- Dockerized
The application is Dockerized to streamline the setup of the development environment on a new machine and enable the app to run Dockerized in production.
The only dependency is that you have Docker up and running on your host system. See the Get Docker guide for your system.
Pull the repo, build the app, setup the database:
git clone [email protected]:JamesOkunlade/isa-api.git
cd isa-api
docker-compose build
docker-compose run --rm app rake db:setup
To start all the services, run:
docker-compose up
This will block your shell, so you'll want to run this in tmux or its own tab.
If you want to detach after starting, you can use the -d
flag.
docker-compose up -d
docker-compose exec app rails console
docker-compose exec app rake db:migrate
- Install Httpie to use in testing endpoints locally from the terminal
# For Mac
$ brew install httpie
# Linux
$ apt install httpie
API Endpoint | Functionality |
---|---|
GET /listjobs | Fetches a list of jobs and their statues |
POST /createjob | Creates a new job |
GET /sidekiq | Displays the sidekiq dashboard |
# To login existing the existing user
http POST :3000/auth/login email=test@example.com password=foobar
# To get all jobs
http :3000/listsjobs \
>Authorization:<auth_token>
# To create a new job
http POST :3000/createjob name='The vampire diaries'
James Okunlade