Skip to content

Commit 1af2520

Browse files
committed
.
Summary: Test Plan: Reviewers: CC: Task ID: #
1 parent d6f7699 commit 1af2520

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/start.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ process.env.NODE_ENV = 'development';
1212
var webpack = require('webpack');
1313
var WebpackDevServer = require('webpack-dev-server');
1414
var config = require('../webpack.config.dev');
15+
var execSync = require('child_process').execSync;
1516

1617
new WebpackDevServer(webpack(config), {
1718
publicPath: config.output.publicPath,
@@ -37,4 +38,11 @@ new WebpackDevServer(webpack(config), {
3738
return console.log(err);
3839
}
3940
console.log('Listening at http://localhost:3000/');
41+
42+
try {
43+
execSync('ps cax | grep "Google Chrome"');
44+
execSync('open -a "Google Chrome" http://localhost:3000/');
45+
} catch(e) {
46+
// Do nothing if Chrome cannot be opened
47+
}
4048
});

0 commit comments

Comments
 (0)