Skip to content

Instantly share code, notes, and snippets.

@vinaydotblog
Created November 18, 2017 17:49
Show Gist options
  • Save vinaydotblog/3a29903be20b793a57590ea7b8c4df52 to your computer and use it in GitHub Desktop.
Save vinaydotblog/3a29903be20b793a57590ea7b8c4df52 to your computer and use it in GitHub Desktop.
PHP Local Server
## Usage Example: serv home.html 5050
## 2nd and 3rd arguments are optional
serv() {
open -a "Google Chrome" http://localhost:${2:-2020}/${1:-}
/usr/bin/php -S localhost:${2:-2020} -t .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment