A simple nodejs based API server for managing tasks for authenticated user.
Test deployed server URL: https://glacial-island-05878.herokuapp.com/health
- Clone the repo
- install the dependencies
yarn - start the server
yarn - on local server if hitting API's via browser, the browser will block the request. Just try after turning off the CORS flag or use a proxy server to hit the localhost server.
- Have docker? Just run
docker-compose up -d
- Authentication
/user/loginPOST request with JSON body:
{
"id": "test",
"name": "test"
}
- All tasks
/user/tasksGET request don't forget to add the bearer token in header. - Create task
/user/tasksPOST request don't forget to add the bearer token in header. JSON Body:
{
"name": "test"
}
- All tasks
/user/tasks/:idPUT request don't forget to add the bearer token in header. JSON Body:
{"completed": true}
-
Delete task
/user/tasks/:idDELETE request don't forget to add the bearer token in header. -
Dashboard
/user/dashboardGET request don't forget to add the bearer token in header.