feat: able to specify host for dev (e.g: 0.0.0.0)

This commit is contained in:
endiliey 2018-08-30 00:29:25 +08:00
parent 9965eec798
commit 8c6bc6dd38
2 changed files with 7 additions and 0 deletions

View file

@ -53,6 +53,7 @@ program
.command('start [siteDir]')
.description('Start development server')
.option('-p, --port <port>', 'use specified port (default: 3000)')
.option('-h, --host <host>', 'use specified host (default: localhost')
.option('-nw, --no-watch <noWatch>', 'disable live reload (default: false)')
.action((siteDir = '.', {port, noWatch}) => {
wrapCommand(start)(path.resolve(siteDir), {port, noWatch});