Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack only runs on port 8080 #294

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Webpack only runs on port 8080 #294

wants to merge 3 commits into from

Conversation

EvanBurbidge
Copy link

This PR contains:

A fix for issue #291 where the user has requested that Webpack runs on other ports if 8080 is in use. I've introduced the npm package detect-port which then allows the program to search for the next available port.

Describe the problem you have without this PR

#291

) : (
app.listen(_port),
console.log('> Listening at ' + uri + _port + '\n')
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we simplify this by

const availablePort = port === _port ? port : _port;

server =  app.listen(availablePort);    
console.log(' > Listening at ' + uri + availablePort +  '\n')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants