mongodb-shell
v1.0.1
Published
a nodejs util to connect to a mongodb shell
Downloads
30
Readme
mongo-shell
a nodejs util to connect and send commands to a mongodb shell
Used on https://www.mplay.run
usage
npm install mongodb-shell
const { MongoShell } = require('mongodb-shell');
const mongoShell = new MongoShell('localhost:27017');
const result = await mongoShell.sendCommand({ in: 'foo=5' });
// result contains :
{
out: "5",
status: "SUCCESS"
}
mongoShell.destroy()