Is there any way to set environment variables when running a Node.js app using JetBrains' official Node plugin for WebStorm (and their other IDEs as well)?
运行节点时是否有设置环境变量的方法?使用JetBrains的官方节点插件WebStorm(以及其他ide)的js应用?
2 个解决方案
#1
5
No, it's not possible from WebStorm, environment variables should be defined in your system.
不,这是不可能的WebStorm,环境变量应该在你的系统中定义。
UPDATE: in the new versions it's possible to set environment variables in the Run/Debug configuration.
更新:在新版本中,可以在运行/调试配置中设置环境变量。
#2
33
It is actually possible Here is the official doc: http://www.jetbrains.com/webstorm/webhelp/run-debug-configuration-node-js.html
这里实际上可能是官方的doc: http://www.jetbrains.com/webstorm/webhelp/rundebug - configurationnodejs.html。
Here is my screenshot
这是我的截图
#1
5
No, it's not possible from WebStorm, environment variables should be defined in your system.
不,这是不可能的WebStorm,环境变量应该在你的系统中定义。
UPDATE: in the new versions it's possible to set environment variables in the Run/Debug configuration.
更新:在新版本中,可以在运行/调试配置中设置环境变量。
#2
33
It is actually possible Here is the official doc: http://www.jetbrains.com/webstorm/webhelp/run-debug-configuration-node-js.html
这里实际上可能是官方的doc: http://www.jetbrains.com/webstorm/webhelp/rundebug - configurationnodejs.html。
Here is my screenshot
这是我的截图