title: How to delete specific data mongodb + nodejs + expressjs
body: <p>How to remove data using node+express. Here is my router for delete process</p>
  
  <pre><code>// Delete user
  router.get('/deleteuser/:id', function(req, res) { 
  var db = req.db;
  
  var uid = req.params.id;
  db.collection('usercollection').remove(uid, function(err, result) { 
      res.send( (result === 1) ? { msg: '' } : { msg: 'error: '+ err } );
  });
  
  });
  </code></pre>
  
  <p>from the above function, i got 404 error page.</p>
  
  <pre><code>Error: Not Found
  at Layer.app.use.res.render.message [as handle] (/media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/app.js:40:15)
  at trim_prefix (/media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/node_modules/express/lib/router/index.js:240:15)
  at /media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/node_modules/express/lib/router/index.js:208:9
  at Function.proto.process_params (/media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/node_modules/express/lib/router/index.js:269:12)
  at next (/media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/node_modules/express/lib/router/index.js:199:19)
  at next (/media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/node_modules/express/lib/router/index.js:176:38)
  at /media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/node_modules/express/lib/router/index.js:137:5
  at /media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/node_modules/express/lib/router/index.js:250:10
  at next (/media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/node_modules/express/lib/router/index.js:160:14)
  at next_layer (/media/bcd44b6a-9c2e-4496-81da-b45d3c349c91/mywork/nodejs/blog/blogone/node_modules/express/lib/router/route.js:77:14)
  </code></pre>
  
  <p>What's wrong with my router code.. please help me. i'm new to node &amp; express</p>