Skip to content

Commit

Permalink
feature: open browser when proxy is ready (#1905)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Herzog <[email protected]>
  • Loading branch information
SRHerzog and Steve Herzog authored Oct 19, 2022
1 parent b35a1b4 commit 3ec5644
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit 3ec5644

Please sign in to comment.