You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
From what I can read, the code currently assumes that Node is on the PATH. I think it's a good idea not to bundle a specific version of Node with this package, but it would be great if it was possible to specify where the Node executable is. Would make it easier to deploy multiple sites using this to the same server where the different sites use different Node versions.
Good idea. This config option could be added to the services.AddNodeServices(config) API, with the default being to continue assuming Node is on the system path.
For anyone wondering how to override the path where the node executable is found, you can do it like this:
publicclassMyHttpNodeInstance:HttpNodeInstance{protectedoverrideProcessStartInfoPrepareNodeProcessStartInfo(stringentryPointFilename,stringprojectPath,stringcommandLineArguments){varstartInfo=base.PrepareNodeProcessStartInfo(entryPointFilename,projectPath,commandLineArguments);// Here you can modify 'startInfo' to specify where the Node executable should be foundreturnstartInfo;}}
Activity
SteveSandersonMS commentedon Dec 9, 2015
Good idea. This config option could be added to the
services.AddNodeServices(config)API, with the default being to continue assuming Node is on the system path.Pull requests are welcome :)
Added OnBeforeStartExternalProcess callback which to NodeServicesOpti…
SteveSandersonMS commentedon Jul 18, 2016
For anyone wondering how to override the path where the
nodeexecutable is found, you can do it like this:... and then set
MyHttpNodeInstanceas the active Node instance type, as per the docs at https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.NodeServices#custom-hosting-models.