Replies: 2 comments
-
what is the actual use case for this? are you expecting some kind of vhosts functionality from it? |
Beta Was this translation helpful? Give feedback.
-
My use case is to be able to set the dev domain that a site runs each time. I have 3 Laravel apps - a main application and 2 api's which I which to develop at the same time. I can set up the main app to use the development domains for the 2 apis and then set the hosts for the Apis so they always start on the same host. My Api's then (with the help of my hosts file) can be
essentially its exactly the same as just doing this
If just removes the step of having to specify the --host each time. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to submit a PR for this, but I am unsure what the correct procedure is. Do I discuss here? Should I just submit the PR?
What is the change
When you call artisan serve you can specify the host and port to use
If you dont specify anything --host default to 127.0.0.1 --host 8000
You can specify the default for --port in .env (SERVER_PORT) but not host.
I would like to add SERVER_HOST to .env to be read as the default host.
This line needs to be updated to this
framework/src/Illuminate/Foundation/Console/ServeCommand.php
Line 198 in 8587185
Why
I know that there is no desire for people to serve production systems with this method, but I have several web apps that interact via api's . It is more straightforward if a host can be set when they are served.
in combination with my
hosts
file I can run 3 webappsapple.example.com
orange.example.com
pear.example.com
Should I submit a PR?
Beta Was this translation helpful? Give feedback.
All reactions