Skip to content

Fake backend service of Rent A Car database for frontend tutorials.

Notifications You must be signed in to change notification settings

ahmet-cetinkaya-instruction/rent-a-car-fake-backend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rent A Car Fake Backend

Fake Backend service of Rent A Car project for frontend tutorials.

⚙️ Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repository:
    git clone https://github.com/ahmet-cetinkaya-instruction/rent-a-car-fake-backend.git
  2. Change your directory in the terminal:
    cd rent-a-car-fake-backend
  3. Install the required packages:
    npm install
  4. Copy the .env.example file and rename it to .env.
  5. Edit the .env file and set the value of the JWT_SECRET_KEY property to a random string of your choice.

🚀 Usage

Start project

npm start

🔀 Routes

Route Comment Body Header Return
auth/login Login process to authenticate users {userName: string, password: string} {success:boolean, access_token:string}
auth/test Test the validity of your access token Authorization: "Bearer <access_token>" {success:boolean, message:string}
auth/test-admin Test if your access token has admin role Authorization: "Bearer <access_token>" {success:boolean, message:string}

About

Fake backend service of Rent A Car database for frontend tutorials.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%