grunt-php
Start a PHP server
Useful for developing PHP projects or running tests on them.
Pretty much a drop-in replacement for grunt-contrib-connect, except for the middleware
option.
Uses the PHP built-in server.
Install
$ npm install --save-dev grunt-php
Usage
grunt; grunt; grunt;
Examples
Start a persistent PHP server and open in browser
grunt; grunt;
BrowserSync
Use it withgrunt; grunt;
grunt-contrib-watch
Use it withgrunt; grunt;
Add path for a custom error log
const path = ; grunt; grunt;
Options
Supports all the php-server
options in addition to the ones below.
keepAlive
Type: boolean
Default: false
Keep the server alive indefinitely. Any task specified after this will not run.
This option can also be enabled ad-hoc by running the task like grunt php:targetname:keepAlive
.
silent
Type: boolean
Default: false
Suppress output produced by the PHP server.
Related
- php-server - Start a PHP server from Node.js
License
MIT © Sindre Sorhus