Git Product home page Git Product logo

bookeasy_server's Introduction

Book Easy Server

Logo

Description

It is build to serve routes and data for Book Easy website

  1. Seamless Mongoose Integration : Leverage the flexibility and efficiency of Mongoose for smooth database interactions, ensuring data integrity and performance.

  2. Secure JWT Authentication : Implement robust JWT-based authentication to protect sensitive data and user information, guaranteeing authorized access.

  3. Expressive Express-Powered API : Utilize the versatility of Express to create a well-structured and scalable REST API.

  4. Clear & Informative Error Handling : Provides meaningful error messages, aiding in troubleshooting and debugging.

Usage

To test the api routes in Postman, use can use this endpoints

Base Url: https://book-easy-server.vercel.app/api

For all requests set the Content-Type in header as application/json and send data in json format

  1. Authentication Rotes

    These routes helps to login and register user to the website

  • Register

Method: POST

  Route: /auth/register

example data { "name":"dummy", "email": "[email protected]", "password": "passwordummy"}

  • Login

Method: POST

Route: /auth/register

example data { "email": "[email protected]", "password":"desiredPassword" }

Set this code in Postman to automatically add token for futher routes

Open Tests and paste this code

const data = pm.response.json()  pm.globals.set("accessToken", data.token)

Open Authorization and set Type to

Bearer Token 
  1. Manipulate User
  • Get User

Method: GET

    Route: /user:userId
  • Update User

Method: PUT

    Route: /user:userId

example data { "name": "updatedName" }

  • Logout User

Method: GET

    Route: /user:userId
  • Delete User

Method: DELETE

    Route: /user:userId

SetUp/Installation

Clone the repository using git clone repository-link and install dependencies using npm install command

Use the sample env file to know the required the envirnomental varabiles for this project

Create your own environemet varaibles

  • MongoDBConnection Url
  • JWT_SECRET
  • RAZORPAY_KEY_ID
  • RAZORPAY_KEY_SECRET

bookeasy_server's People

Contributors

sridhar-geek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.