Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
fix(serve): open browser to localhost
Browse files Browse the repository at this point in the history
open browser to localhost
  • Loading branch information
danbucholtz committed Nov 15, 2016
1 parent 39edd2e commit 14275c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ export function serve(context?: BuildContext) {
}

function onReady(config: ServeConfig, context: BuildContext) {
const host = config.host === '0.0.0.0' ? 'localhost' : config.host;
if (config.launchBrowser || config.launchLab) {
const openOptions: string[] = [`http://${config.host}:${config.httpPort}`]
const openOptions: string[] = [`http://${host}:${config.httpPort}`]
.concat(launchLab(context) ? [IONIC_LAB_URL] : [])
.concat(browserOption(context) ? [browserOption(context)] : [])
.concat(platformOption(context) ? ['?ionicplatform=', platformOption(context)] : []);

open(openOptions.join(''), browserToLaunch(context));
}
const host = config.host === '0.0.0.0' ? 'localhost' : config.host;
Logger.info(`dev server running: http://${host}:${config.httpPort}/`, 'green', true);
Logger.newLine();
}
Expand Down

0 comments on commit 14275c7

Please sign in to comment.