{"id":15323548,"url":"https://github.com/pauloportugal/nodejs-task-manager","last_synced_at":"2026-02-28T04:43:23.798Z","repository":{"id":42678801,"uuid":"240806645","full_name":"PauloPortugal/nodejs-task-manager","owner":"PauloPortugal","description":"A Node.js REST api with Mongoose","archived":false,"fork":false,"pushed_at":"2022-12-22T19:28:01.000Z","size":262,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-26T06:42:09.809Z","etag":null,"topics":["expressjs","mongodb","mongoose","nodejs","rest-api","restful-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PauloPortugal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-16T00:13:08.000Z","updated_at":"2020-12-19T20:09:14.000Z","dependencies_parsed_at":"2023-01-30T16:16:27.556Z","dependency_job_id":null,"html_url":"https://github.com/PauloPortugal/nodejs-task-manager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PauloPortugal/nodejs-task-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PauloPortugal%2Fnodejs-task-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PauloPortugal%2Fnodejs-task-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PauloPortugal%2Fnodejs-task-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PauloPortugal%2Fnodejs-task-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PauloPortugal","download_url":"https://codeload.github.com/PauloPortugal/nodejs-task-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PauloPortugal%2Fnodejs-task-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29924815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","mongodb","mongoose","nodejs","rest-api","restful-api"],"created_at":"2024-10-01T09:20:18.771Z","updated_at":"2026-02-28T04:43:23.783Z","avatar_url":"https://github.com/PauloPortugal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Node.js task manager REST API with Mongoose\nA Node.js REST API with [Mongoose](https://mongoosejs.com/docs/) and [Express.js](http://expressjs.com/)\n\nThis is part of Andrew Mead's (mead.io) \"The Complete Node.js Developer Course\".\n\n## Goal\nCreate a task manager via a REST API.\n\nAdditionaly uses:\n * [async/await](https://javascript.info/async-await) to handle asyncronous operations\n * [bcryptjs](https://www.npmjs.com/package/bcryptjs) to hash passwords\n * [JWT](https://www.npmjs.com/package/jsonwebtoken) for representing claims securely between the client and the API\n * [Express.js middleware](https://expressjs.com/en/guide/using-middleware.html) to validate user sessions\n\n\n## CURL examples\n\nBelow are a few `curl` commands to exercise the REST API user resources\n\n```\n# create a new user\ncurl -X POST -H \"Content-Type: application/json\" -i \"localhost:3000/users\" -d '{\"name\":\"James\", \"password\":\"somePaw98\", \"email\":\"test@test.com\", \"age\":38}'\n\n# login\ncurl -X POST -H \"Content-Type: application/json\" -i \"localhost:3000/users/login\" -d '{\"password\":\"somePaw98\", \"email\":\"test@test.com\"}'\n\n# logout\ncurl -X POST -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/users/logout\"\n\n# logout and delete all sessions\ncurl -X POST -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/users/logoutAll\"\n\n# return user profile\ncurl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/users/me\"\n\n# return all users\ncurl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/users\"\n\n# return one user\ncurl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/users/:id\"\n\n# update the details of an user\ncurl -X PATCH -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/users/me\" -d '{\"age\":50}'\n\n# delete one user\ncurl -X DELETE -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/users/me\"\n```\n\n\nBelow are a few `curl` commands to exercise the REST API task resources\n\n```\n# create a new task\ncurl -i  -X POST -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/tasks\" -d '{\"description\":\"Buy some groceries\"}'\n\n# return all tasks\ncurl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/tasks\"\n\n# return one task\ncurl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/tasks/:id\"\n\n# update the details of a task\ncurl -X PATCH -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/tasks/:id\" -d '{\"description\":\"Buy four apples\"}'\n\n# delete one task\ncurl -X DELETE -H \"Content-Type: application/json\" -H \"Authorization: Bearer TOKEN_ID\" -i \"localhost:3000/tasks/:id\"\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauloportugal%2Fnodejs-task-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpauloportugal%2Fnodejs-task-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauloportugal%2Fnodejs-task-manager/lists"}