【文件属性】:
文件名称:服务条款:用于正常终止Node.js HTTP服务器的模块
文件大小:99KB
文件格式:ZIP
更新时间:2021-02-28 08:59:04
JavaScript
服务期
入门
要安装模块:
npm install serv-term --save
特征
API参考
serv-term〜createServerTerminator(服务器,选项)⇒ function
注册连接侦听器,并返回一个函数,该函数在调用时将关闭服务器和所有打开的连接
种类: 内部方法返回: function启动服务器关闭的功能
参数
类型
描述
服务器
http.Server | https.Server
要终止的服务器
选项
object
接受以下选项
[options.timeout]
number
强制终止服务器之前要等待的时间
执照
【文件预览】:
serv-term-develop
----.eslintrc(26B)
----.github()
--------workflows()
----lib()
--------index.test.js(8KB)
--------index.js(3KB)
----.npmignore(70B)
----jsconfig.json(415B)
----LICENSE(1KB)
----.prettierrc(97B)
----README.md(1KB)
----.lintstagedrc(116B)
----CODE_OF_CONDUCT.md(3KB)
----templates()
--------README.hbs(341B)
--------CHANGELOG.hbs(699B)
----.gitignore(47B)
----.jest.json(349B)
----.renovaterc(284B)
----CHANGELOG.md(4KB)
----.eslintignore(36B)
----package-lock.json(321KB)
----.auto-changelog(70B)
----package.json(2KB)