feat(dev-server): Allow overriding host for dev server up#11
Open
renanmedina wants to merge 3 commits intomarko-php:developfrom
Open
feat(dev-server): Allow overriding host for dev server up#11renanmedina wants to merge 3 commits intomarko-php:developfrom
renanmedina wants to merge 3 commits intomarko-php:developfrom
Conversation
95a94da to
010ba9d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Overview
This pull request lets the PHP built-in server used by
dev:upbind to a configurable host (defaultlocalhost), with optional overrides via--host/-h, matching how port is already configurable. It is intended for environments where listening only onlocalhostis not enough (for example, access from another interface or container).Related
#9
🎯 Key Changes
Default host in dev config
dev.hostinpackages/dev-server/config/dev.phpwith defaultlocalhostso projects can override it in their own config.dev:upcommand behavior--host,-h) first, thendev.hostfrom config.php -Swith that host and port; startup message reflects the same host and port.Tests
dev.host.dev.host).📝 Technical Details
packages/dev-server/config/dev.phphostkey defaulting tolocalhost.packages/dev-server/src/Command/DevUpCommand.php$hostfrom input and config; use it inphp -Sand in the user-facing startup line.packages/dev-server/tests/Command/DevUpCommandTest.phpdev.hostin test helper; new test assertingphp -Suses configured host.✅ Testing
./vendor/bin/pest packages/dev-server/tests/Command/DevUpCommandTest.php(or full suite with./vendor/bin/pest --parallel).marko dev:up(ormarko up) with--host=0.0.0.0and confirm the process listens on the expected address.🚀 Deployment Notes
localhostunless they setdev.hostor pass--host/-h.