node-systemd:支持在systemd下将node.js作为套接字激活的服务运行
用于Node.js的systemd添加了对在systemd下将node.js作为套接字激活的服务运行的支持。有关如何以及为什么的更多信息: :有关套接字激活的更多背景,请访问:http:显然,这仅适用于具有systemdLinux发行版(例如Fedora)。用法您可以通过npm安装最新版本: $ npm install systemd需要systemd模块并将'systemd'作为参数传递给listen(): require ( 'systemd' ) ; var http = require ( 'http' ) ; http . createServer ( function ( req , res ) { res . writeHead ( 200 , { 'Content-Type' : 'text/plain' } ) ; res
6.61KB
文件大小:
评论区