This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 250423 - Add support for setting an environment variables from Node.js project properties
Summary: Add support for setting an environment variables from Node.js project properties
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal with 5 votes (vote)
Assignee: _ tboudreau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-14 09:30 UTC by elennaro
Modified: 2016-02-08 09:08 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description elennaro 2015-02-14 09:30:36 UTC
Add ability to set environment variables for current Node.js project Run Properties.

We can add a field/list: node.js project -> Properties -> Run -> The Env Properties Field

Where I can put for axample NODE_ENV=developer, MYAPP_PORT=3000

and get my-app executed like:

>set(export) NODE_ENV=developer && set MYAPP_PORT=3000 && node main.js

For example take a look at Webstorm's settings.
Comment 1 eino 2015-11-24 13:10:09 UTC
Does anyone knows any way to do it now?  set environment variable first and then start netbeans?
Comment 2 elennaro 2015-11-24 14:23:24 UTC
Vote for this please.

you either set variables and restart or write custom .sh for linux .bat for windows script like:

SET MY_ENV_VAR=1
node

and select your script from project properties -> Node js in custom node instead of node directly.