Make company global travel and accommodation easy and convenient for the strong workforce of savvy members of staff, by leveraging the modern web.
For API documentation, please visit https://caret-bn-backend.herokuapp.com//api/v1/api-docs/
-
Install Docker on your local machine by following these instructions.
-
After you have ensured that docker is running, clone the repo.
-
Configure your environment with the following as follows:
# DATABASE CONFIG
DB_USERNAME=
DB_PASSWORD=
# DEVELOPMENT DATABASE
DEVELOPMENT_DB=
# TEST DATABASE
TEST_DB=
# PRODUCTION DATABASE
PRODUCTION_DB=
PRODUCTION_PORT=
DATABASE_PRODUCTION_HOST=
DATABASE_PRODUCTION_PORT=
# DATABASE HOST // Default to localhost
DATABASE_HOST=localhost
# DOCKER CONFIG
# DOCKER DB CONFIG
DATABASE_PORT=
# APPLICATION
APPLICATION_PORT=port_your_application_will_run_on
-
When the repo is cloned, run the command
docker-compose build
to build the image out -
If you have no errors run
docker-compose up
. -
Access
http://localhost:<:APPLICATION_PORT>
in Postman, if docker is running correctly, you will be returned with a message:{ "status": 200, "message": "Welcome to Barefoot Nomad!" }
-
Ensure you have Postgres running
_Note: Your Postgres Database will run on port <:DATABASE_PORT>
. If you're using PgAdmin or Postico ensure you create a database on the server localhost:<:DATABASE_PORT>
-
When the server is running, create a database on your new PG server. Ensure your new development database is the same name as your
DEVELOPMENT_DB
and your test database is the same name asTEST_DB
environment variables -
Run the command
sequelize db:migrate:all
-
Run the command sequelize
db:seed:all
-
Check your database to ensure proper functionality and correctness.
-
To run a production version of the application, set up environment variables and execute the command
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
Endpoint | Request Method | Request parameter |
---|---|---|
/api/v1/users/register | POST | { "email": "[email protected]", "username": "KrinkYF", "password": "Kun376$$#$", "confirmPassword": "Kun376$$#$" } |
No known bugs. If you spot one, let us know
Andela Rwanda's Team ^CARET