From cc49c612af33f0078f1821b4990cc64f09a07f6e Mon Sep 17 00:00:00 2001 From: Aqeeb Imtiaz Harun Date: Fri, 10 Aug 2018 11:37:47 +0800 Subject: [PATCH] updated readme --- readme.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index ddf64c9..a7fdf1a 100644 --- a/readme.md +++ b/readme.md @@ -1,11 +1,23 @@ # JSON Server for IZYIM -## Login +## 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 + +### Login + +Run the following command first. ```bash -$ npm run api-auth +$ npm install +$ npm run start-auth ``` -Follow [this link](https://www.techiediaries.com/fake-api-jwt-json-server/) [or this link](https://github.com/techiediaries/fake-api-jwt-json-server) for further details +On Postman, navigate to http://localhost:3000/auth/login and use x-www-form-urlencoded/JSON with 'phone' and 'password' fields. -Use x-www-form-urlencoded in Postman, user details are in users.json \ No newline at end of file +User details can be found in users.json. + +Follow [this link](https://www.techiediaries.com/fake-api-jwt-json-server/) [or this link](https://github.com/techiediaries/fake-api-jwt-json-server) for further details.