Skip to content

Commit

Permalink
Merge branch 'main' of github.com:lumeland/lume
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed May 27, 2024
2 parents 505989e + fe53943 commit b4dba01
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/utils/cli_options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@ export function getOptionsFromCli(
options.dest = cli.dest;
}

const serveMode = cli.serve || cli._[0] === "cms";

if (cli.port) {
(options.server ||= {}).port = parseInt(cli.port);
} else if (cli.serve) {
} else if (serveMode) {
(options.server ||= {}).port = 3000;
}

let location: URL;

if (cli.location) {
location = new URL(cli.location);
} else if (options.location && !cli.server) {
} else if (options.location && !serveMode) {
location = options.location as URL;
} else {
location = new URL("http://localhost");
Expand Down

0 comments on commit b4dba01

Please sign in to comment.