Skip to content

Latest commit

 

History

History
112 lines (90 loc) · 2.37 KB

README.md

File metadata and controls

112 lines (90 loc) · 2.37 KB

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

  1. Clone the project
git clone
  1. Install dependencies
npm install
  1. 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

  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

Author

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