API-Basic is a simple example of CRUD using the API.
| Route | HTTP method | Description |
|---|---|---|
| /api/users | GET | Get all the users info |
| /api/users/:id | GET | Get a single user info |
| /api/users/ | POST | Create a user |
| /api/users/:id | DELETE | Delete a user |
| /api/users/:id | PUT | Update a user with new info |
Create user requires {username:'', password:'', role:<'admin' or 'user'>}
Install the dependencies first and then start the app as follows:
$ npm install
$ npm startAccess the website via HTTP://localhost:3000, running the app in Postman is recommended