从 Grunt 任务中启动 MongoDB [英] Start MongoDB from within a Grunt task
本文介绍了从 Grunt 任务中启动 MongoDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以从 Grunt 任务中启动 MongoDB?基本上,当我使用 grunt server
运行我的开发环境时,我希望它也可能通过运行 mongod
来启动 MongoDB 服务器.
Is it possible to start MongoDB from within a Grunt task? Basically when I'm running my development environment with grunt server
I want it to start up the MongoDB server as well possibly by running mongod
.
推荐答案
您可以使用 grunt-shell 运行命令:
You can use grunt-shell to run the command:
grunt.initConfig({
shell: {
mongo: {
command: 'mongod'
}
}
});
这篇关于从 Grunt 任务中启动 MongoDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文