- create a folder anywhere on your system(eg. desktop)
- open a terminal at the folder path and clone the repository by using following command
- git clone [email protected]:dalvirushikesh/rushikesh_instawork_backend-.git
- change directory to the project directory using following command
- cd rushikesh_instawork_backend-
- now to install all npm packages run following command
- npm install
- To start the application use following command
- node server.js
Now you have your application up and running on port 3000
-
check application health point using following curl command
-
curl -v http://localhost:3000/healthz
-
To Create a team member use following command
-
curl -X POST -H "Content-Type: application/json"
-d '{
"first_name":"test",
"last_name":"test", "email":"[email protected]", "phone_number":"36555434343", "role":"admin" }'
http://localhost:3000/v1/account -
To get all team members data use following curl command
-
To update team members data use following curl command
-
curl -X PUT -H "Content-Type: application/json"
-d '{ "first_name":"demo",
"last_name":"demo", "email":"[email protected]", "phone_number":"36555434343", "role":"admin" }'
http://localhost:3000/v1/account/f38a477f-dd96-444f-9496-d9cae4fc5061 -
To delete team member data use following curl command
-
curl -X DELETE http://localhost:3000/v1/account/480f136f-da9c-4339-88cb-0be4d5a7751e
-
id mentioned after api end point is the autogenerated id of the team member
you can use postman to play with the above API end points for better understanding