API for cab booking system using NodeJS, Express, MySQL, Sequelize, PassportJS and JWT tokenization.
Please follow the given instructions for setting up this project locally. To get a local copy check code tab and run following commands to get started.
Before starting the project install all dependencies by running,
-
npm environment
npm install npm@latest -g
After installing all dependencies follow these steps to setup the project,
- Start your SQL server on the device.
- In project, configure
Config.js
according to the SQL server. - After that Create/Migrate all the models and database schema in the database,
npx sequelize-cli db:create npx sequelize-cli db:migrate
- Use seeder to import test data, or add new entries using routes.
npx sequelize-cli db:seed:all
- Finally, Run the project by running,
node index.js
The project will start at localhost:5000 by default.
Following are the endpoints of the API, through which you can communicate with the server.
- Server Homepage (get -
localhost:5000/
) - New user registration (post -
localhost:5000/auth/register
) - Existing user login (post -
localhost:5000/auth/login
) - Check available rides (get -
localhost:5000/ride/check
) - Book a available ride (post -
localhost:5000/ride/book
) - Finish an ongoing ride (post -
localhost:5000/ride/finish/:id
) - Check completed rides (get -
localhost:5000/ride/completed
)
Anant Dhok - LinkedIn - anantdhok16@gmail.com
Distributed under the MIT License. See LICENSE
for more information.