diff --git a/core/docz-core/src/commands/serve.ts b/core/docz-core/src/commands/serve.ts index 8480d37d0..449e05b7c 100644 --- a/core/docz-core/src/commands/serve.ts +++ b/core/docz-core/src/commands/serve.ts @@ -11,12 +11,19 @@ export const serve = async (args: Arguments) => { if (config.port) { cliArgs.push('--') - // Append gatsby option `port`to CLI args + // Append gatsby option `port` to CLI args // https://www.gatsbyjs.org/docs/cheat-sheet/#cheat_sheet-text cliArgs.push('--port') cliArgs.push(String(config.port)) } + if (config.host) { + // Append gatsby option `host` to CLI args + // https://www.gatsbyjs.org/docs/cheat-sheet/#cheat_sheet-text + cliArgs.push('--host') + cliArgs.push(String(config.host)) + } + sh.cd(paths.docz) spawnSync('npm', cliArgs) }