This project is built using rails-api as the backend, using a postgresql database. And a boilerplate of react as the client.
It is currently reachable online at this url.
The project can be run locally following these steps in two separate terminal tabs:
Inside the rails folder (calories_rails_api):
$ bundle install
$ rake db:setup
$ rails test
$ rails s -p 3001
Inside the react folder (calories_react_client):
$ npm install
$ npm test
$ npm start
The result should be the rails server and the node server running.
In your browser you can now navigate to localhost:3000
and see the application live locally.
Additionally from the tests done in the rails api, the endpoints can be tested using the following postman client .
To use the postman client you first need to obtain an auth_token
using the Sessions#create
endpoint. Once you have it, you can pass it in the Authorization
header in every request.