We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1391c67 commit c40a7b6Copy full SHA for c40a7b6
mongoRemove.js
@@ -0,0 +1,12 @@
1
+var mongo=require('mongodb').MongoClient;
2
+mongo.connect('mongodb://localhost:27017/'+process.argv[2],function (er,db) {
3
+ if (er) console.log('Eroare:'+er);
4
+ var col=db.collection(process.argv[3]);//collection name is passed as argument
5
+ col.remove({_id:process.argv[4]},
6
+ function(err,data)
7
+ {
8
+ if (err)
9
+ console.log('Eroare'+err);
10
+ db.close();
11
+ });
12
0 commit comments