有没有办法从Webstorm(Mac)运行mongod [英] Is there a way of Running mongod from webstorm (mac)

查看:100
本文介绍了有没有办法从Webstorm(Mac)运行mongod的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此线程中: 从webstorm运行mongod.exe

它指出mongo4idea应该可以解决问题,但是mongo4idea仅替换mongo shell.这意味着在使用mongo4idea插件之前,mongod服务应该已启动并运行.

it points that mongo4idea shall do the trick, however, mongo4idea is only replacing the mongo shell. It means that the mongod service should be up and running before we use the mongo4idea plugin.

WebStorm/IntelijIdea等是否可以自动启动服务器?

Is there a way for WebStorm/IntelijIdea etc... to start the server automatically?

当前,我正在使用以下命令手动启动服务器: mongod --dbpath /some/path/to/data

Currently I'm starting the server manually using: mongod --dbpath /some/path/to/data

推荐答案

您可以使用外部工具(Settings/Tools/External Tools)轻松完成此操作,添加新工具,将path/to/mongod指定为程序",--dbpath /some/path/to/data-作为参数",在显示于"部分中选择要添加此操作的菜单.请注意,您还可以在Settings/Keymap/External Tools/External Tools/<your tool name>

You can easily do this using External tools (Settings/Tools/External Tools), add a new tool, specify path/to/mongod as a 'Program', --dbpath /some/path/to/data - as 'Parameters', choose menus you's like to add this action to in 'Show in' section. Note that you can also assign a shortcut to your tool in Settings/Keymap/External Tools/External Tools/<your tool name>

这篇关于有没有办法从Webstorm(Mac)运行mongod的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆