Skip to content

Commit

Permalink
Default port to process.env.PORT (#2559)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liz authored and devongovett committed Jan 21, 2019
1 parent 6cbf2a6 commit bdc044a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/core/parcel-bundler/src/cli.js
Expand Up @@ -218,11 +218,8 @@ async function bundle(main, command) {

command.target = command.target || 'browser';
if (command.name() === 'serve' && command.target === 'browser') {
const server = await bundler.serve(
command.port || 1234,
command.https,
command.host
);
const port = command.port || process.env.PORT || 1234;
const server = await bundler.serve(port, command.https, command.host);
if (server && command.open) {
await require('./utils/openInBrowser')(
`${command.https ? 'https' : 'http'}://localhost:${
Expand Down

0 comments on commit bdc044a

Please sign in to comment.