简体   繁体   English

将Node.js HTTP服务器作为Windows服务运行

[英]Run nodejs http-server as a windows service

I want to run nodejs http-server which serves a static file as a windows service which autostarts on boot. 我想运行nodejs http-server,它将一个静态文件作为Windows服务在启动时自动启动。 How do we keep this server running in background? 我们如何使该服务器在后台运行?

use NSSM . 使用NSSM

You usually need a windows service to be destined for being a server, this is a service manager that works as a service and lets you make simple apps into windows services. 通常,您需要将Windows服务注定要用作服务器,这是一个服务管理器,可以充当服务,并允许您将简单的应用程序制作为Windows服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM