{"id":28288727,"url":"https://github.com/josecorreamorales/node-rest-api","last_synced_at":"2026-05-05T20:36:34.175Z","repository":{"id":198083316,"uuid":"686472231","full_name":"JoseCorreaMorales/Node-REST-API","owner":"JoseCorreaMorales","description":"This is a REST API for a simple store management system. It allows you to create, read, update and delete products and users. It also allows you to generate a report of all products in an excel file.","archived":false,"fork":false,"pushed_at":"2023-10-03T22:42:10.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T15:44:39.578Z","etag":null,"topics":["expressjs","mongoatlas","nodejs","rest-api"],"latest_commit_sha":null,"homepage":"https://node-rest-api-production-b87c.up.railway.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoseCorreaMorales.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,"governance":null}},"created_at":"2023-09-02T22:56:10.000Z","updated_at":"2023-10-03T23:11:41.000Z","dependencies_parsed_at":"2023-10-04T10:13:39.883Z","dependency_job_id":null,"html_url":"https://github.com/JoseCorreaMorales/Node-REST-API","commit_stats":null,"previous_names":["josecorreamorales/node-rest-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JoseCorreaMorales/Node-REST-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoseCorreaMorales%2FNode-REST-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoseCorreaMorales%2FNode-REST-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoseCorreaMorales%2FNode-REST-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoseCorreaMorales%2FNode-REST-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoseCorreaMorales","download_url":"https://codeload.github.com/JoseCorreaMorales/Node-REST-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoseCorreaMorales%2FNode-REST-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32667377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","mongoatlas","nodejs","rest-api"],"created_at":"2025-05-22T00:12:58.643Z","updated_at":"2026-05-05T20:36:34.167Z","avatar_url":"https://github.com/JoseCorreaMorales.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node-REST-API\n\n### Technologies\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-Node.js-339933?style=for-the-badge\u0026logo=node.js\u0026logoColor=white\" alt=\"Node.js Icon\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/-JavaScript-F7DF1E?style=for-the-badge\u0026logo=javascript\u0026logoColor=black\" alt=\"JavaScript Icon\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-MongoDB%20Atlas-47A248?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white\" alt=\"MongoDB Atlas Icon\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/-Express.js-000000?style=for-the-badge\u0026logo=express\u0026logoColor=white\" alt=\"Express.js Icon\" /\u003e\n\u003c/p\u003e\n\n## Description\nThis is a REST API for a simple store management system. It allows you to create, read, update and delete products and users. It also allows you to generate a report of all products in an excel file.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./src/common/apiArchitecture.png\" alt=\"API Architecture\" width=\"500\"\u003e\n    \u003cimg src=\"./src/common/modulo.png\" alt=\"API Architecture\" width=\"200\"\u003e\n\u003c/p\u003e\n\n \n## Usage\n\nStart the server: npm start\nOpen a web browser and navigate to http://localhost:3000\n\nrun the following command to install all the dependencies\n```\nnpm install\n```\n\nrun the following command to start the server\n```\nnpm run dev\n```\n\n### env example\nimportant to use **dotenv** to use the env variables\n\n```env\nPORT=3000\nMONGO_URI=mongodb+srv://\u003cusername\u003e:\u003cpassword\u003e@\u003ccluster\u003e/\u003cdatabase\u003e?retryWrites=true\u0026w=majority\nMONGO_DB_NAME=\u003cdatabase\u003e\n```\n\n## API Endpoints\n* **/api/products**\n    * **GET**: Get all products\n    * **POST**: Create a new product\n\n* **/api/products/:id**\n    * **GET:** Get a single product by ID\n    * **PUT:** Update a product by ID\n    * **DELETE:** Delete a product by ID\n\n*  **/api/products/report**\n    * **GET:** Get a report of all products (Excel)\n    ###### ⚠️ to get a report on postman use the toggle button and select the option \"Send and download\" and then send the request\n\n\n* **/api/users**\n    * **GET**: Get all users\n    * **POST:** Create a new user\n\n* **/api/users/:id**\n    * **GET:** Get a single user by ID\n    * **PUT:** Update a user by ID\n    * **DELETE:** Delete a user by ID\n\n* **/api/sales**\n    * **GET**: Get all sales\n    * **POST:** Create a new sale\n\n* **/api/sales/:id**\n    * **GET:** Get a single sale by ID\n    * **PUT:** Update a sale by ID\n    * **DELETE:** Delete a sale by ID\n\n\n# Database\nThis project uses MongoDB as the database (Mongo Atlas). The database connection is established in the database/index.js file. The database name is \"catalog\" and the collection names are \"products\", \"sales\" and \"users\".\n\n## Configuration\nConfiguration options can be set in the config.js file.\n\n\n## Debugging\nDebugging can be enabled by setting the DEBUG environment variable to \"app:*\". For example, on Linux or macOS, use the following command:\n```\nDEBUG=app:* npm start\n```\nOn Windows, use the following command:\n```\nset DEBUG=app:* \u0026 npm start\n```\n\n## Testing\nInstall dev dependencies: npm install --dev\nRun tests: npm test\n\n## Resources\n* [Node.js](https://nodejs.org/en/)\n* [Express](https://expressjs.com/)\n* [MongoDB](https://www.mongodb.com/)\n* [Debug ](https://www.npmjs.com/package/debug)\n* [excel4node ](https://www.npmjs.com/package/excel4node)\n* [http-errors ](https://www.npmjs.com/package/http-errors)\n\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosecorreamorales%2Fnode-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosecorreamorales%2Fnode-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosecorreamorales%2Fnode-rest-api/lists"}