【文件属性】:
文件名称:php-server:启动一个PHP服务器
文件大小:11KB
文件格式:ZIP
更新时间:2021-05-26 03:28:17
nodejs php development webserver npm-package
PHP服务器
启动一个
使用PHP的内置开发Web服务器(不适用于生产)。
只要PHP服务器正在运行,Node.js进程就会自动保持活动状态。
安装
$ npm install php-server
用法
const phpServer = require ( 'php-server' ) ;
( async ( ) => {
const server = await phpServer ( ) ;
console . log ( `PHP server running at ${ server . url } ` )
} ) ( ) ;
原料药
phpServer([选项])
返回具有以下属性的对象:
stdout - 。
stderr - 。
url服务器的URL。
stop() -停止服务器。
选项
类型: object
港口
类型: number 默认值:
【文件预览】:
php-server-main
----.gitignore(23B)
----package.json(715B)
----.npmrc(19B)
----index.js(3KB)
----.github()
--------workflows()
----license(1KB)
----example.js(156B)
----readme.md(3KB)
----index.test-d.ts(379B)
----.gitattributes(19B)
----test()
--------test.js(2KB)
--------fixtures()
----.editorconfig(175B)
----index.d.ts(3KB)