/api-trip

Primary LanguageJavaScript

api-trip

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.
## Endpoints
Method Endpoint Description
## How to use the project 1. Open postman
2. 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
3. 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

Don't forget to give a ⭐ if you like this project.