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

If port 3000 is being used, find another port #52

Open
jedahan opened this issue Apr 26, 2018 · 1 comment
Open

If port 3000 is being used, find another port #52

jedahan opened this issue Apr 26, 2018 · 1 comment

Comments

@jedahan
Copy link

jedahan commented Apr 26, 2018

https://www.npmjs.com/package/get-port has a neat way of doing this - you request 3000 but if that doesn't work, it grabs another one.

You can then use https://www.npmjs.com/package/opn to automatically open it

And then in the browser, grab the port from window.location

Lemme know the good/bad/ugly of this idea

@janpaul123
Copy link
Owner

Localstorage (which contains the settings) is per-port. So you'd lose your settings if it'd automatically pick a different port.

Just quit whatever is running on port 3000 when developing locally? (And use the paperprograms.org hosted version when not developing)

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

No branches or pull requests

2 participants