Taxi24 is a new startup based in Kigali. They would like to disrupt the taxi industry in Rwanda by providing a white-label solution to the existing taxi companies and hotels.
https://taxi24-app.herokuapp.com/api/v1/
-
Open your terminal
-
Run
clone https://github.com/victkarangwa/Taxi24-API.git
OR Download the project
-
Create a
.env
file reflecting to.env.example
file -
Add the values to all environmental variables in
.env
file -
Make sure you have PostgreSQL installed (You can download it here)
-
This app uses Google direction api. Thus, you need to also provide google API keys. Read more on Directions API
- Run
npm run test
oryarn test
- You should get
13 passing
test
Open termin in the directory you clone the repo from:
-
Run
npm install
to install all dependencies -
Using postgres, create database for both dev and testing environment. In your
.env
, database URL should be of this format:DATABASE_DEV_URL=postgres://[user]:[password@[host]:[port/[db_name]
ex:DATABASE_DEV_URL=postgres://postgres:123@localhost:5432/taxi24_dev
-
Run
npm run db:migrate
oryarn db:migrate
to automatically create all necessary models -
Run
npm run db:seed:dev
oryarn db:seed:dev
to seed data in the database -
Run
npm run dev-server
to start local development server. You can also simulate production server locally by runningnpm start
-
Open your postman and access
http://localhost:<:APPLICATION_PORT>
(by default, the port is3000
) , if app is running correctly, you will get a response with a message:{ status: 200, message: "TAXI24 APIs" }
-
For more, please read Taxi24 API documentation