mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Design review: Always instantiate via DI
This commit is contained in:
@@ -25,21 +25,5 @@ namespace Microsoft.AspNetCore.NodeServices
|
||||
public bool LaunchWithDebugging { get; set; }
|
||||
public IDictionary<string, string> EnvironmentVariables { get; set; }
|
||||
public int? DebuggingPort { get; set; }
|
||||
|
||||
public NodeServicesOptions AddDefaultEnvironmentVariables(bool isDevelopmentMode)
|
||||
{
|
||||
if (EnvironmentVariables == null)
|
||||
{
|
||||
EnvironmentVariables = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
if (!EnvironmentVariables.ContainsKey("NODE_ENV"))
|
||||
{
|
||||
// These strings are a de-facto standard in Node
|
||||
EnvironmentVariables["NODE_ENV"] = isDevelopmentMode ? "development" : "production";
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user