php-server
php-server copied to clipboard
Is there a way to keep the server alive?
Hi @sindresorhus,
thanks for the package! We have one problem. Maybe you can help us.
The server seems the be paused from time to time. Is there an option or another way to keep the server alive until I close the terminal?
System: macOS 11.6, Node v14.17.3, npm 6.14.13
Every support is welcome!
I need a solution for the same problem, after few minutes the server closes without alert
@solemone or @sindresorhus found a method to solve it?
I had a similar issue and after a lot of debugging finally got it working by clearing the stdout and stderr streams
start().then((server) => {
// Clearing the buffer to prevent the server from hanging
server.stdout.on('data', () => {})
server.stderr.on('data', () => {})
})