咱們知道 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