Skip to content

Commit 011dcf2

Browse files
authored
Merge pull request #4 from webdevian/quiet
Add quiet option to hide php process output
2 parents 4c684f6 + d7f31d7 commit 011dcf2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Name | Default | Description
3131
`port` | `8000` | The port used
3232
`directory` | `null` | The document root. By default is the current working directory
3333
`script` | `null` | The "router" script
34+
`stdio` | `inherit` | stdio option passed to the spawned process - https://nodejs.org/api/child_process.html#child_process_options_stdio
3435
`directives` | `{}` | An object with the custom PHP directives
3536
`config` | `null` | The path of a custom php.ini file
3637
`env` | `process.env` | The environment variables passed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = class PHPServer {
1010
this.script = null;
1111
this.directives = {};
1212
this.config = null;
13+
this.stdio = 'inherit';
1314
this.env = process.env;
1415

1516
if (config) {
@@ -50,7 +51,7 @@ module.exports = class PHPServer {
5051

5152
run(cb) {
5253
this.process = spawn(this.php, this.getParameters(), {
53-
stdio: 'inherit',
54+
stdio: this.stdio,
5455
env: this.env
5556
});
5657

0 commit comments

Comments
 (0)