Adjusts the location open uses

Currently when using open, the cli will ignore the host and protocol and always open `http://localhost`.

This pr adjusts the open script to use the options protocol and host and default back to localhost if not provided.
This commit is contained in:
smacpherson64 2022-08-24 11:17:42 -05:00
parent 418a909144
commit 5713e340e4

View File

@ -33,7 +33,7 @@ export default async function openApp(app: true | string, options: Options) {
}
await open(
`http://localhost:${options.port}/`,
`${options.protocol}://${options.host ?? 'localhost'}:${options.port}/`,
app !== 'browser' ? { app: { name: app } } : undefined
);
}