Fake Backend service of example telecommunication database for frontend tutorials.
To get a local copy up and running follow these simple steps.
- npm
npm install npm@latest -g
- Clone the repo
git clone https://github.com/ahmet-cetinkaya-instruction/telco-fake-backend.git
- Install NPM packages
npm install
- Copy
.env.example
and rename as.env
. - Set
JWT_SECRET_KEY
value in.env
Start project
npm start
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} |