Online-bus-ticket-reservation
Introduction
Hello everyone, this is a project that I have done for assignment. This project is a simple online bus ticket reservation system.
Technologies and libraries
Technologies || libraries | why |
---|---|
express | I have used express to create a server and to create a REST API. |
mongoose | I have used mongoose to connect to the database. |
body-parser | Used body-parser to parse the body of the request. |
cors | Used cors to allow cross-origin requests. |
nodemon | Used nodemon to automatically restart the server when the file changes. |
bcrypt | Used bcrypt to hash the password. |
jsonwebtoken | Used jsonwebtoken to create a token. |
dotenv | Used dotenv to load environment variables from a .env file. |
How to run the project
- Clone the project
git clone
- Install dependencies
npm install
- Run the project
npm run dev
Endpoints
Method | Endpoint | Description |
---|---|---|
POST | /api/v1/mekna7/signup | Register a user |
POST | /api/v1/mekna7/signin | Login a user |
How to use the project
-
Open postman
-
Send a POST request to
/api/v1/mekna7/signup
to register a user- The request body should be in JSON format
- The request body should contain the following fields:
- full_name
- email
- age
- password
- full_name
- The request body should be in JSON format
-
Send a POST request to
/api/v1/mekna7/signin
to login a user- The request body should be in JSON format
- The request body should contain the following fields:
- email
- password
- email
- The request body should be in JSON format
Author
Don't forget to give a