Skip to content

Commit

Permalink
fix(docz-core): pass down host when running serve (#1384)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShinyLeee committed Feb 10, 2020
1 parent e81286a commit 80a0e1e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/docz-core/src/commands/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ export const serve = async (args: Arguments<any>) => {

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)
}

0 comments on commit 80a0e1e

Please sign in to comment.