Home

Why does linqpad open a console window for this app ?

If i try to run this app in Linqpad I get a console that opens (nodejs console). It i try the same code in a console app or an ASPnet app in Visual Studio nothing shows up.

Why is that ?

Thanks

If you want to try it you need to add nugets :
- Microsoft.Extensions.DependencyInjection
- Microsoft.AspNetCore.NodeServices
async Task  Main()
{
	var services = new ServiceCollection();
	services.AddNodeServices();
	var serviceProvider = services.BuildServiceProvider();
	using(var nodeServices = serviceProvider.GetRequiredService<INodeServices>())
	{
		var result = await nodeServices.InvokeAsync<int>("c:/users/manu/downloads/parser.js", "1+2*3");
		result.Dump();
	}
}
Sign In or Register to comment.