Node.js PHP built-in Server
A node.js tool to launch PHP built-in servers.
Requirements
- php >= 5.4.0 on your system.
Installation
$ npm install php-built-in-server
Usage
var PHPServer = ;
Simple usage
var server = ; server; server; server;
Explicit parameters
var server = 'path/to/phpExecutable' '/path/to/php.ini'; server; server; // pathes can be absolute or relativesserver;
Show "examples" folder.
TODO
- find solution for partial buffering of stderr:
fwrite(fopen('php://stderr', 'w'), 'test');
is immediatly receive from PHP but stderr datas coming from server himself is buffured.
If someone knows how to fix this...
Known issues
- No data is received from the child process to confirm explicitly that the server is listening.
- The stderr of the child process logs all queries, not just errors.
- The stderr seems buffered (show TODO).
Licence
Copyright (c) 2013 Valéry Herlaud. Licensed under the MIT license. See the file LICENSE.md in this distribution for more details.