Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

UncleBill
Copy link

Can pass optional argument to npm run dev. like:

npm run dev -- --port 6060 run at port 6060.

Copy link
Contributor

@posva posva left a 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.
Copy link
Contributor

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

@UncleBill
Copy link
Author

@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.
Copy link
Contributor

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

@posva
Copy link
Contributor

posva commented Sep 20, 2017

Actually, this is not necessary once #913 is merged

@UncleBill
Copy link
Author

Well, port detection is more intelligent, but my patch is very light without extra dependency, it provides chance to specify a port anytime .

@LinusBorg
Copy link
Contributor

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.

@LinusBorg LinusBorg closed this Sep 30, 2017
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.

3 participants