Skip to content

ahmet-cetinkaya-instruction/telco-fake-backend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telco Fake Backend Server

Fake Backend service of example telecommunication database 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 repo
    git clone https://github.com/ahmet-cetinkaya-instruction/telco-fake-backend.git
  2. Install NPM packages
    npm install
  3. Copy .env.example and rename as .env.
  4. Set JWT_SECRET_KEY value in .env

🚀 Usage

Start project

npm start

🔀 Routes

Check json-server routes.

In addition:

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

About

Fake backend service of Telco database for frontend tutorials.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.1%
  • Shell 2.9%