作者:爱你王明英 | 来源:互联网 | 2023-05-19 18:13
IrecentlystartedtouseWebStormandbeforethisIusedtousenodemonasasupervisor,soitwatc
I recently started to use WebStorm and before this I used to use nodemon as a supervisor, so it watches any code change and restart the server.
我最近开始使用WebStorm,在此之前,我使用nodemon作为管理员,所以它监视任何代码更改并重新启动服务器。
How can I reach the same effect running node by the IDE? Thanks!
如何通过IDE达到相同的运行节点效果?谢谢!
[EDIT]
(编辑)
While there's no 9 version/live edit I'm posting my solution:
虽然没有9个版本/实时编辑,但我发布了我的解决方案:
It's just have nodemon installed globaly and used it as a Node Parameter in the project configuration.
它只是让nodemon安装了globaly,并将它用作项目配置中的节点参数。
More details and screenshot below:
详情及截屏如下:
- Discover where is the nodemon's path;
- Here (OSX) is "/usr/local/bin/nodemon" and it could be discovered using "which nodemon" (on terminal);
- 这里(OSX)是“/usr/local/bin/nodemon”,它可以通过“which nodemon”(在终端)被发现;
- 发现nodemon之路在哪里;这里(OSX)是“/usr/local/bin/nodemon”,它可以通过“which nodemon”(在终端)被发现;
- Use this path in the Node Parameter field;
- Go to Run > Edit configurations, choose your configuration below the Node.js option at left;
- 运行>编辑配置,选择节点下面的配置。js选择离开;
- 在节点参数字段中使用此路径;运行>编辑配置,选择节点下面的配置。js选择离开;
Screen shot for detail: https://photos-4.dropbox.com/t/1/AAC1WJBhh1RUnIBZEaG3YQ80iMswJH2XmFqb4GtiYwqj2A/12/11986044/png/1024x768/3/1413997200/0/2/Captura%20de%20tela%202014-10-22%2013.52.47.png/exYBAGzU3uZwj45i3XxZkgPKb_mfyL_O_q3EFRK5pFk
详细截图:https://photoss-4.dropbox.com/t/aac1wjbhh1hh13yqyq80imswjh2xmfh2xmfqb4gtiywqbqj2a/12/11986044 / pngng6/1024x768 /1413997200/0/2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2
1 个解决方案