mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-mockapi.git
synced 2026-08-23 06:24:24 +00:00
25 lines
743 B
Markdown
25 lines
743 B
Markdown
# JSON Server for IZYIM
|
|
|
|
## Getting Started
|
|
We will be using JSON Server + JWT Auth for this project's login functionality. (Later further updates will be added.)
|
|
|
|
## Prerequisites
|
|
- [Node.js & NPM](https://nodejs.org/en/download/).
|
|
- [Postman Software](https://www.getpostman.com/) to test the API.
|
|
|
|
### Installation
|
|
|
|
Run the following command first.
|
|
|
|
```bash
|
|
$ npm install
|
|
$ npm run start-auth
|
|
```
|
|
|
|
### Usage
|
|
On Postman, navigate to http://localhost:3000/auth/login and use x-www-form-urlencoded/JSON with 'phone' and 'password' fields.
|
|
|
|
User details can be found in users.json.
|
|
|
|
Follow [this](https://www.techiediaries.com/fake-api-jwt-json-server/) or [this](https://github.com/techiediaries/fake-api-jwt-json-server) for further details.
|