{"id":21292483,"url":"https://github.com/bipul-hossein/mongodb_crud_operations","last_synced_at":"2026-04-12T17:07:02.241Z","repository":{"id":137368984,"uuid":"562579069","full_name":"bipul-hossein/mongodb_crud_operations","owner":"bipul-hossein","description":"Here is the MongoDB crude operation done in a simple way. Which is done step by step to make it easy to understand. And here are some simple examples.","archived":false,"fork":false,"pushed_at":"2023-10-01T19:05:57.000Z","size":330,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T06:32:55.256Z","etag":null,"topics":["database","javascipt","mongodb","nodejs","react"],"latest_commit_sha":null,"homepage":"","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/bipul-hossein.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":"2022-11-06T19:21:41.000Z","updated_at":"2024-10-21T20:23:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"63ffdc5e-224f-4748-b6a2-891d2f4544ae","html_url":"https://github.com/bipul-hossein/mongodb_crud_operations","commit_stats":null,"previous_names":["bipul-hossein/mongodb_crud_operations"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bipul-hossein%2Fmongodb_crud_operations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bipul-hossein%2Fmongodb_crud_operations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bipul-hossein%2Fmongodb_crud_operations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bipul-hossein%2Fmongodb_crud_operations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bipul-hossein","download_url":"https://codeload.github.com/bipul-hossein/mongodb_crud_operations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243762232,"owners_count":20343972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["database","javascipt","mongodb","nodejs","react"],"created_at":"2024-11-21T13:50:18.402Z","updated_at":"2026-04-12T17:07:02.200Z","avatar_url":"https://github.com/bipul-hossein.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Go To- src \u003e Pages \u003e Home \u003e Home.js\n\n// Get requests \n```ruby\nuseEffect(() =\u003e {\n        fetch('http://localhost:5000/users')\n            .then(res =\u003e res.json())\n            .then(data =\u003e setUsers(data))\n}, [])\n```\n\n// POST example\n// step_1. create a post Api in Server site\n// step_2. uploading json data with method,headers,body; like this-\n/* ----------See the exam. in mozilla doc-------------- */\n```ruby\nfetch('http://localhost:5000/users', {\nmethod: 'POST',\n headers: {\n'Content-Type': 'application/json',\n},\nbody: JSON.stringify(user),\n})\n            .then(response =\u003e response.json())\n  .then(data =\u003e {\n    console.log('Success:', data);\n    const newUsers = [...users, data];\n    setUsers(newUsers)\n  })\n  .catch(error =\u003e {\n    console.error('Error:', error);\n  });\n  //server site\n  // step_4 receive req with(req.body);\n  // step_5 stop undefine data use middle ware (app.use(express.json());)    \n  event.target.reset()\n    }\n```\n\n// DELETE\n\n```ruby\n  const handleDelete = user =\u003e {\n  const agree = window.confirm(`you want to delete${user.name}`)\n  if (agree) {\n  // console.log(`you want to delete${user._id}`)\n  fetch(`http://localhost:5000/users/${user._id}`, {\n  method: 'DELETE',\n  })\n   \n.then(response =\u003e response.json())\n  .then(data =\u003e {\n    console.log('Success:', data);\n    if (data.deletedCount \u003e 0) {\n      alert('User delete successfully')\n      const remainingUsers = users.filter(usr =\u003e usr._id !== user._id)\n      setUsers(remainingUsers)\n    }\n  })\n  .catch(error =\u003e {\n    console.error('Error:', error);\n  });             \n  }\n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbipul-hossein%2Fmongodb_crud_operations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbipul-hossein%2Fmongodb_crud_operations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbipul-hossein%2Fmongodb_crud_operations/lists"}