Skip to content
Open
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 backend/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { env } from "process";

export type Options = {
basePort: number;
open: boolean;
csp: boolean;
verbose: boolean;
};
Expand Down
8 changes: 7 additions & 1 deletion backend/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export function createProgram(inject: Inject): Command {
parsePort,
7000,
)
.option("-o, --open", "automatically open webxdc-dev UI in the browser")
.option("--no-csp", "run instances without CSP applied")
.option(
"-v, --verbose",
Expand All @@ -46,7 +47,12 @@ export function createProgram(inject: Inject): Command {
.action(async (location, options) => {
await run(
location,
{ basePort: options.port, csp: options.csp, verbose: options.verbose },
{
basePort: options.port,
open: options.open,
csp: options.csp,
verbose: options.verbose,
},
inject,
);
});
Expand Down
3 changes: 1 addition & 2 deletions backend/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ async function actualRun(

instances.start();

if (!env["CODESPACE_NAME"]) {
// do not auto open on gh codespace
if (options.open) {
open("http://localhost:" + options.basePort);
}
}
Expand Down