mongodb-shell
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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()

Package Sidebar

Install

npm i mongodb-shell

Weekly Downloads

13

Version

1.0.1

License

MIT

Unpacked Size

16.8 kB

Total Files

14

Last publish

Collaborators

  • jtassin