This API is built in case someone wants to test the Redux-store-sample, or someone who needs simple API which contains USERS and CUSTOMERS lists.
The API is deployed at Heroku and you can access:
USERS: https://github.com/YordanovDnA/Redux-store-sample/api/users
CUSTOMERS: https://github.com/YordanovDnA/Redux-store-sample/api/customers
AUTH: https://github.com/YordanovDnA/Redux-store-sample/api/auth
You can use the auth path to send post http request for authorization of user. For example:
Using Postman send a post request to the /auth endpoint and it will return a jwt. Then you can use jwt-decode to decode the token. The token is encripted information about the user.
For more examples look at the documentation.
If you'd like to modify feel free to clone this repository and change whatever you want.
Use the package manager npm to install the dependences.
npm install
npm start
The API will run on localhost port 9002.
Example accessing the users: http://localhost:9002/api/users
You can use axios or any other http requests library to send http requests to the API's endpoints.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.