Skip to content

Commit

Permalink
--host instead of --hostname; no -h or -p (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock authored Jan 3, 2024
1 parent 0c355cd commit ed90d64
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bin/observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,24 @@ switch (command) {
}
case "preview": {
const {
values: {config, root, hostname, port}
values: {config, root, host, port}
} = helpArgs(command, {
options: {
...CONFIG_OPTION,
hostname: {
host: {
type: "string",
short: "h",
default: process.env.HOSTNAME ?? "127.0.0.1"
},
port: {
type: "string",
short: "p",
default: process.env.PORT
}
}
});
await import("../src/preview.js").then(async (preview) =>
preview.preview({
config: await readConfig(config, root),
hostname: hostname!,
hostname: host!,
port: port === undefined ? undefined : +port
})
);
Expand Down

0 comments on commit ed90d64

Please sign in to comment.