To complete this challenge, you need to ensure all route returns a similar response object as described in our API guide. To achieve this goal
- You will have to fix the existing bugs
- Implement the incomplete functions,
- Add test cases for the main functions of the system.
- Use Dockerfile to the root of the project to run the app in docker environment
In order to install and run this project locally, you would need to have the following installed on you local machine.
-
Clone this repository
-
Navigate to the project directory
-
Run
bundle install
to instal the projects dependencies -
Provide values for the following environment variables used within the app, using:
export MYSQL_USER=<your_database_username>
export MYSQL_PASSWORD=<your_database_user_password>
export MYSQL_DATABASE=<your_database_name>
- Create a MySQL database and run the
sql
file in the database directory to migrate the database
mysql -u <db_user_name> -D <db_name> -p < db/dump.sql
- Run
rails s
to start the app in development
- Build image
docker build -t rails_application .
- Run container
docker run -it -p 8000:8000 -v $(pwd):/backend rails_application
- Check here
- Visit
http://127.0.0.1:8000