php -S localhost:8000
You directory is accessible on: http://localhost:8000
In ~/.bashrc
add:
alias serve='open http://localhost:8000; php -S localhost:8000'
Now you can just use the serve
alias. It will launch the server and open the url in you default browser.
Note: open
is an Mac OS X command, you should be able to find a similar command on other systems though.