import type { Argv } from 'yargs' import type { ParsedOptions } from './types.js' export const description = 'Start a server for serving the web side' export function builder(yargs: Argv) { yargs.options({ port: { description: 'The port to listen on', type: 'number', alias: 'p', }, host: { description: 'The host to listen on', type: 'string', }, apiProxyTarget: { description: 'Forward requests from the apiUrl (in cedar.toml or (redwood.toml)) ' + 'to this target. apiUrl must be a relative URL', type: 'string', alias: 'api-proxy-target', }, // Deprecated alias of `apiProxyTarget` apiHost: { hidden: true, alias: 'api-host', }, }) } export async function handler(options: ParsedOptions) { const { handler } = await import('./cliConfigHandler.js') await handler(options) }