{"id":20485699,"url":"https://github.com/alpha74/productscrud_nodejs","last_synced_at":"2026-05-29T18:31:20.034Z","repository":{"id":154633773,"uuid":"632402259","full_name":"alpha74/productsCRUD_Nodejs","owner":"alpha74","description":"A simple CRUD app for Product table using Nodejs, ExpressJs, Mongoose","archived":false,"fork":false,"pushed_at":"2023-04-26T11:27:44.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T16:37:09.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alpha74.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-25T10:34:15.000Z","updated_at":"2023-04-26T05:55:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5dcbf03-5deb-42ad-85ac-fd8ed6898767","html_url":"https://github.com/alpha74/productsCRUD_Nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alpha74/productsCRUD_Nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FproductsCRUD_Nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FproductsCRUD_Nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FproductsCRUD_Nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FproductsCRUD_Nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpha74","download_url":"https://codeload.github.com/alpha74/productsCRUD_Nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2FproductsCRUD_Nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33666290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":[],"created_at":"2024-11-15T16:32:43.047Z","updated_at":"2026-05-29T18:31:20.016Z","avatar_url":"https://github.com/alpha74.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Node.js_logo.svg/2560px-Node.js_logo.svg.png\" height=\"100px\" width=\"150px\"\u003e\n\n## CRUD app for Products\n\n- A simple CRUD operation APIs defined for model `Product`\n\n- Using Nodejs, ExpressJs and Mongoose\n\n### Run dev\n\n- `npm run dev`\n\n\n### Run prod\n\n- `node server.js`\n\n\n-----------\n\n### APIs\n\n- Response codes used are: `200 OK, 404 NOT FOUND, 500 INTERNAL SERVER ERROR`\n\n#### Nudge server\n\n- `GET /`\n\n- Sample Request: `http://localhost:3000/`\n- Response: `Hello`\n\n-----------\n\n#### Get single product detail\n\n- `GET /products/\u003cid\u003e`\n\n- Sample Request:\n\n```\nGET http://localhost:3000/products/6447ab99bfe33111831d5880\n```\n\n- Sample Response\n\n```\n{\n    \"name\": \"brush\",\n    \"quantity\": 2,\n    \"price\": 50,\n    \"image\": \"IMAGE_LINK\",\n    \"_id\": \"6447ab99bfe33111831d5880\",\n    \"createdAt\": \"2023-04-25T10:29:45.566Z\",\n    \"updatedAt\": \"2023-04-25T10:29:45.566Z\",\n    \"__v\": 0\n}\n```\n\n\n---------\n\n#### Get all products list\n\n- `GET /products`\n\n- Sample Request\n\n```\nGET http://localhost:3000/products/\n```\n\n- Sample Response\n\n```\n[\n  {\n    \"name\": \"brush\",\n    \"quantity\": 2,\n    \"price\": 50,\n    \"image\": \"IMAGE_LINK\",\n    \"_id\": \"6447ab99bfe33111831d5880\",\n    \"createdAt\": \"2023-04-25T10:29:45.566Z\",\n    \"updatedAt\": \"2023-04-25T10:29:45.566Z\",\n    \"__v\": 0\n},\n{\n    \"name\": \"brrom\",\n    \"quantity\": 2,\n    \"price\": 50,\n    \"image\": \"IMAGE_LINK\",\n    \"_id\": \"6447ab99bfe33111831d5880\",\n    \"createdAt\": \"2023-04-25T10:29:45.566Z\",\n    \"updatedAt\": \"2023-04-25T10:29:45.566Z\",\n    \"__v\": 0\n}\n]\n```\n\n----------\n\n#### Add new product\n\n- `POST /products`\n\n- Sample Request\n\n```\nPOST http://localhost:3000/products/\n\nJSON payload\n{\n    \"name\" : \"brush\",\n    \"quantity\": 2,\n    \"price\" : 50,\n    \"image\" : \"IMAGE_LINK\"\n}\n```\n\n- Sample Response:\n\n```\n{\n    \"name\": \"brush\",\n    \"quantity\": 2,\n    \"price\": 50,\n    \"image\": \"IMAGE_LINK\",\n    \"_id\": \"6447ab99bfe33111831d5880\",\n    \"createdAt\": \"2023-04-25T10:29:45.566Z\",\n    \"updatedAt\": \"2023-04-25T10:29:45.566Z\",\n    \"__v\": 0\n}\n```\n\n---------------\n\n#### Update Product\n\n- `PUT /products/\u003cid\u003e`\n\n- Sample Request:\n\n```\nPUT http://localhost:3000/products/6447ab99bfe33111831d5880\n\nJSON payload\n{\n    \"name\" : \"brush\",\n    \"quantity\": 2,\n    \"price\" : 50,\n    \"image\" : \"IMAGE_LINK\"\n}\n```\n\n- Sample Response\n\n```\n{\n    \"name\": \"brush\",\n    \"quantity\": 2,\n    \"price\": 50,\n    \"image\": \"IMAGE_LINK\",\n    \"_id\": \"6447ab99bfe33111831d5880\",\n    \"createdAt\": \"2023-04-25T10:29:45.566Z\",\n    \"updatedAt\": \"2023-04-25T10:29:45.566Z\",\n    \"__v\": 0\n}\n```\n\n-----------\n\n\n#### Delete a Product\n\n- `DELETE /products`\n\n- Sample Request:\n\n```\nDELETE http://localhost:3000/products/6447ab99bfe33111831d5880\n```\n\n- Sample Response:\n\n```\n{\n    \"name\": \"brush\",\n    \"quantity\": 2,\n    \"price\": 50,\n    \"image\": \"IMAGE_LINK\",\n    \"_id\": \"6447ab99bfe33111831d5880\",\n    \"createdAt\": \"2023-04-25T10:29:45.566Z\",\n    \"updatedAt\": \"2023-04-25T10:29:45.566Z\",\n    \"__v\": 0\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha74%2Fproductscrud_nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpha74%2Fproductscrud_nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha74%2Fproductscrud_nodejs/lists"}