The following table shows overview of the Rest APIs that will be exported:
- GET
api/user
get all Users - PUT
api/user/update-balance
update user balance (need to passuserId
(existig user id is1
) andamount
as a request body)
- Installing module nodes
npm install
. - Run migrations:
npm run migrate
. - Run our Node.js application with command:
npm start
The app will run on8080
port by default.
Using Postman, we're gonna test all the Apis above.
Host - http://localhost:8080/api/user/update-balance
Body - {
"userId": "1",
"amount": 2
}
npm install
npm run migrate
Before start you should update config.json
file with right credentials (By default app uses development
config).
npm start