Skip to content

Commit c9047f8

Browse files
committed
build: add dev app proxy server for testing across devices
We currently can't test the dev app across devices, because the Bazel server doesn't allow us to configure the server host. These changes adds a very simple, temporary, proxy server that runs in parallel to Bazel dev server and proxies all requests to it, while allowing devices to connect to it.
1 parent dd548be commit c9047f8

File tree

2 files changed

+452
-25
lines changed

2 files changed

+452
-25
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"bazel:buildifier": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,output-group,package-name,package-on-top,redefined-variable,repository-name,same-origin-load,string-iteration,unused-variable,unsorted-dict-items,out-of-order-load",
1919
"bazel:format-lint": "yarn -s bazel:buildifier --lint=warn --mode=check",
2020
"dev-app": "ibazel run //src/dev-app:devserver",
21+
"dev-app-proxy": "browser-sync start --proxy localhost:4200 --host 0.0.0.0 --port 4201 --no-open --no-ui --no-watch",
2122
"test": "bazel test //src/... --test_tag_filters=-e2e,-browser:firefox-local --build_tag_filters=-browser:firefox-local --build_tests_only",
2223
"test-firefox": "bazel test //src/... --test_tag_filters=-e2e,-browser:chromium-local --build_tag_filters=-browser:chromium-local --build_tests_only",
2324
"lint": "gulp lint && yarn -s bazel:format-lint",
@@ -92,6 +93,7 @@
9293
"@types/run-sequence": "^0.0.29",
9394
"autoprefixer": "^6.7.6",
9495
"axe-webdriverjs": "^1.1.1",
96+
"browser-sync": "^2.26.7",
9597
"chalk": "^1.1.3",
9698
"clang-format": "^1.2.4",
9799
"codelyzer": "^5.1.0",

0 commit comments

Comments
 (0)