mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Add ability to configure environment variables for Node instances, plus auto-populate NODE_ENV based on IHostingEnvironment when possible. Fixes #230
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
@@ -34,7 +35,7 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
|
||||
private int _portNumber;
|
||||
|
||||
public HttpNodeInstance(string projectPath, string[] watchFileExtensions, ILogger nodeInstanceOutputLogger,
|
||||
bool launchWithDebugging, int? debuggingPort, int port = 0)
|
||||
IDictionary<string, string> environmentVars, bool launchWithDebugging, int? debuggingPort, int port = 0)
|
||||
: base(
|
||||
EmbeddedResourceReader.Read(
|
||||
typeof(HttpNodeInstance),
|
||||
@@ -43,6 +44,7 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
|
||||
watchFileExtensions,
|
||||
MakeCommandLineOptions(port),
|
||||
nodeInstanceOutputLogger,
|
||||
environmentVars,
|
||||
launchWithDebugging,
|
||||
debuggingPort)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user