Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: open browser when proxy is ready #1905

Merged
merged 1 commit into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/xarc-app-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"mkdirp": "^1.0.4",
"nix-clap": "^1.3.13",
"nyc": "^15.1.0",
"open": "^8.4.0",
"optional-require": "^1.1.8",
"pkg-up": "^3.1.0",
"prompts": "^2.4.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/xarc-app-dev/src/lib/dev-admin/redbird-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Path from "path";
import _ from "lodash";
import redbird from "@jchip/redbird";
import ck from "chalker";
import open from "open";
import { makeOptionalRequire } from "optional-require";
import { devProxy } from "../../config/dev-proxy";
import { cdnMock } from "./cdn-mock";
Expand Down Expand Up @@ -292,6 +293,7 @@ View status at <green>${proxyUrls.https || proxyUrls.http}${controlPaths.status}
.join(" or ");

console.log(ck`You can access your app at ${urlsShow}`);
open(proxyUrls.https || proxyUrls.http);
}, 100).unref();
};

Expand Down