-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Make changing port from cli possible. #923
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think it may be better to actually use automatic port detection
``` | ||
|
||
If port 8080 is already in use on your machine you must change the port number in `/config/index.js`. Otherwise `npm run dev` will fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is still true, can you leave something similar like:
You can change the port at `config/index.js` as well if you don't want to pass the option every time
@posva updated. |
``` | ||
|
||
If port 8080 is already in use on your machine you must change the port number in `/config/index.js`. Otherwise `npm run dev` will fail. | ||
You can change the port at `config/index.js` as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you don't want to pass the option every time
Actually, this is not necessary once #913 is merged |
Well, port detection is more intelligent, but my patch is very light without extra dependency, it provides chance to specify a port anytime . |
Hi @UncleBill Thanks for your PR. However, I just merged port detection, also you can use the PORT env variable as well as the config. That should provide more than enough options to configure this. So I have to close this PR. |
Can pass optional argument to
npm run dev
. like:npm run dev -- --port 6060
run at port 6060.