mongorun
v1.0.3
Published
run mongo command
Downloads
3
Readme
mongorun
run mongo command in Node.js
一般我们在robo里执行命令查看结果
db.runCommand( { serverStatus: 1 } ).connections
现在用Node.js实现
安装
npm install --save mongorun
用法
var cfg = require('./default')
require('mongorun')(cfg, {serverStatus: 1}, function(err, result){
console.log(result.connections)
})
配置项
{
"host": "localhost",
"port": 27017,
"reconnect": true,
"reconnectInterval": 50
}
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
版本历史
- v1.0.0 初始化版本
欢迎fork和反馈
- write by
i5ting
[email protected]
如有建议或意见,请在issue提问或邮件
License
this repo is released under the MIT License.