咱们知道 npm 是很大的库,不少轮子能够用javascript
因此 .net core 替咱们封装了一个调用 nodejs 的 service html
就叫 node service java
咱们只要在 server 安装 nodejs node
而后就能够写 js, require npm 的 packages npm
而后经过 .net core 的 service 容许这个 js 而后返回对应的 result. windows
好比我想解析一个 html, npm 里就有不少轮子能够作这个. ide
具体实现参考 :ui
http://www.javashuo.com/article/p-mpmcofth-x.html.net
http://rion.io/2017/08/22/nodeservices-where-javascript-and-net-meet-back-on-the-other-side/rest
须要注意的时,安装 nodejs 后最好是 restart 一下
而后 nodejs 最好是安装在默认的 c drive
若是路径不对,咱们得经过 enviroment variable 去修改,
windows 的话是去 start -> edit environment variables -> 修改掉 PATH