【文件属性】:
文件名称:等待本地主机:等待本地主机准备就绪
文件大小:6KB
文件格式:ZIP
更新时间:2021-02-05 17:08:29
nodejs server delay npm-package wait
等待本地主机
等待本地主机准备就绪
如果您需要本地服务器在执行其他操作之前准备好接受请求,则很有用。
安装
$ npm install --global wait-for-localhost
用法
const waitForLocalhost = require ( 'wait-for-localhost' ) ;
( async ( ) => {
await waitForLocalhost ( { port : 8080 } ) ;
console . log ( 'Server is ready' ) ;
} ) ( ) ;
API
waitForLocalHost([选项])
返
【文件预览】:
wait-for-localhost-main
----index.js(662B)
----test.js(1KB)
----package.json(644B)
----index.test-d.ts(304B)
----readme.md(1KB)
----.github()
--------funding.yml(91B)
--------workflows()
----license(1KB)
----index.d.ts(958B)
----.gitignore(23B)
----.npmrc(19B)
----.editorconfig(175B)
----.gitattributes(19B)