-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add CLI and config option to auto assign port #1191
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
Comments
@robert-prib-polestar have you tried using a port set to |
@shellscape I will give it a go, didn't realise that! |
This can be closed, I now realised this project uses portfinder to assign a new port if the current one is in use. I don't believe there is any need to set port to I just realised that my project is still stuck on old version of webpack and webpack-dev-server and we cant use this feature until we upgrade to webpack2+, as portfinder plugin wasnt added to webpack-dev-server unil version 2.2.0. |
@robert-prib-polestar thanks for following up. and wow, webpack 1.x is really old! the performance and fidelity improvements alone are worth the upgrade to webpack 3! |
@shellscape What you think about using https://github.com/node-modules/detect-port to do this? |
@montogeek I no longer maintain this module and have shifted my focus to https://www.npmjs.com/package/webpack-serve. webpack-serve uses https://github.com/sindresorhus/get-port and I believe webpack-dev-server does as well iirc. |
Uh oh!
There was an error while loading. Please reload this page.
Code
Example code for port auto assign
This example script checks if the current port is in use and keeps trying attempting to start the dev server by traversing up by 1 based on the provided starting port.
https://gist.github.com/robert-prib-polestar/29cc8fab3eb83602009df3fbdb626ac4
Motivation / Use Case
The text was updated successfully, but these errors were encountered: