Is there a Valid way to run node modules from C# Class ?
There are some options which I know
- Use JS/TS to execute node module and host it in node API. Call that node API from c#.
- Use command prompt/Powershell to execute node script and run powershell process from c#.
- Use thirdparty nuget package like jerring or Jint
1st option is straight forward but I don’t like the approach as it seems like calling another api from one api.
2nd option is feasible when running on windows vm and also creation of additional process is a burden on processor.
3rd option is preferrable but these libraries do not have full support for ES6.
Earlier there was aspnetcore.JavaScript service package but that seems to be deprecated
Please suggest best option or any new option if available.
You can try this for running Javascript from C# https://andrewlock.net/running-javascript-in-a-dotnet-app-with-javascriptengineswitcher/