How can I serve and open the website from the current directory in one command with php built-in webserver?
The command used for php built-in webserver is:
php [options] -S <addr>:<port> [-t docroot]
However this is a running command, so the following command does not work:
php -S 127.0.0.1:8000 && open 127.0.0.1:8000
Purpose is creating a single alias command to open the website in a browser directly after starting the webserver (all from a single command):
alias lserve="php -S 127.0.0.1:8000 && open 127.0.0.1:8000"