Anyone know how to set environment variables for running and debugging Node.js applications in Eclipse + Nodeclipse aka Enide Studio? For example, in a .js file, an environment variable can be referenced as process.env.PORT
, for the environment variable PORT. How can I specify this variable within Enide?
Asked
Active
Viewed 2,269 times
1

Paul Verest
- 60,022
- 51
- 208
- 332

justwondering
- 181
- 1
- 10
-
Correct names are Nodeclipse and Enide Studio, see http://www.nodeclipse.org/ – Paul Verest Feb 27 '14 at 02:03
1 Answers
2
I found the solution to my question. First, go to the menu item File > Properties
. Then select Run/Debug Settings
from the options on the left of the dialog. Then select the .js
file for which you want to set an environment variable during debugging/running programs in Enide Studio / Eclipse + Nodeclipse. Then select the [Edit]
button. On the dialog that appears, select the [Environment]
tab. Then select the [New]
button and enter in your desired variable name and value. Repeat for multiple environment variables. Click [Apply]
, then try running your program. Your environment values should be available as process.env.YOUR_VARIABLE_NAME
in your Node.js source code.

Paul Verest
- 60,022
- 51
- 208
- 332

justwondering
- 181
- 1
- 10
-
Please be aware of issue #122 https://github.com/Nodeclipse/nodeclipse-1/issues/122 – Paul Verest Feb 27 '14 at 02:05