Skip to content

Commit 00b87a7

Browse files
josephperrottthePunderWoman
authored andcommitted
build: automatically select a random available port when running adev locally (angular#63740)
Previously we relied on the default port of 4200, but if it was already in use then we would run into issues where the cli provided a prompt which we were unable to respond to. Instead we now request port 0 which will automatically find an available port. PR Close angular#63740
1 parent 50b3e9f commit 00b87a7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bazel_dep(name = "yq.bzl", version = "0.2.0")
1818
bazel_dep(name = "rules_angular")
1919
git_override(
2020
module_name = "rules_angular",
21-
commit = "17eac47ea99057f7473a7d93292e76327c894ed9",
21+
commit = "4010ef96de0c46db7764adc2f262258c9de3d718",
2222
remote = "https://github.com/devversion/rules_angular.git",
2323
)
2424

adev/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ ng_application(
146146
ng_config = ":ng_config",
147147
node_modules = "//adev:node_modules",
148148
project_name = "angular-dev",
149+
serve_args = config_based_architect_flags + [
150+
"--port",
151+
"0",
152+
],
149153
)
150154

151155
ng_test(

0 commit comments

Comments
 (0)