diff --git a/src/index.ts b/src/index.ts index 8b2d974..d9a454c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,6 +15,7 @@ program .name("@outerbase/studio") .version("0.1.0") .option("--port ", "Set port to serve", "4000") + .option("--base-path ", "Set the base path for the web application", "/") .option("--user ", "Set basic authentication username") .option("--pass ", "Set basic authentication password") .option("--config ", "Launch studio using configuration file") @@ -27,6 +28,7 @@ program pass?: string; user?: string; port?: number; + basePath?: string; config?: string; log?: boolean; } @@ -34,6 +36,7 @@ program let options: ServeOptions = { driver: null, port: flags?.port ?? 4000, + basePath: flags?.basePath ?? "/", studio: STUDIO_PATH, username: flags?.user, password: flags?.pass, diff --git a/src/studio.ts b/src/studio.ts index 826a6fb..7f2d579 100644 --- a/src/studio.ts +++ b/src/studio.ts @@ -28,7 +28,7 @@ const htmlCode = `