Set Node.js environment variables in WebStorm

2019-01-26 03:36发布

问题:

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)?

回答1:

No, it's not possible from WebStorm, environment variables should be defined in your system.

UPDATE: in the new versions it's possible to set environment variables in the Run/Debug configuration.



回答2:

It is actually possible Here is the official doc: http://www.jetbrains.com/webstorm/webhelp/run-debug-configuration-node-js.html

Here is my screenshot