[5.8] SERVER_PORT env in ServeCommand#28849
Conversation
|
Although one could argue the |
This is a justifiable exception. Using the --port flag isn't practical when you are running 10-15 different projects that need to have a defined port and have that info shared across an international team of 20 devs. This is a simple and effective solution to a real world problem. |
|
i think @driesvints will suggest you to send this to master branch And This is my suggestion if you add default host in the Command it will be help full So Here is the Situation Since Some Project or in Development but my team are using it via connection to local ip to do that here is what i do
So it Will be nice if you add host variable too Anyway lets see what @taylorotwell Says |
I work at a relatively large corporate firm and we heavily use Laravel/Lumen to make microservices. I often run 4 or 5 of these projects simultaneously using the command
php artisan serve. It would be really handy if I could specify a default port for each of the projects by adding a new environment variable into the .env.In this pull request I've made a very small change by adding the env() function to the ServeCommand so if the environment variable SERVER_PORT is set it will use that port otherwise it will default to the standard port 8000 if this is not set.