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

Default port in use #64

Closed
klmr opened this issue Jun 28, 2014 · 5 comments
Closed

Default port in use #64

klmr opened this issue Jun 28, 2014 · 5 comments
Milestone

Comments

@klmr
Copy link

klmr commented Jun 28, 2014

The default port of grip – 5000 – is already in use on my OS X 10.9. When accessing http://localhost:5000, I get a text response, saying

ERROR: Another instance is running

(I get this whenever accessing the address, regardless of whether grip is running.)

It would be good if grip used a different default port, or had a configurable port. At the moment, settings are only read from settings.py and settings_local.py. Having them read from $HOME/.griprc (say) would help.

@klmr
Copy link
Author

klmr commented Jun 28, 2014

Worth noting: as far as I can tell, the port is taken up by Bonjour, a core service of the OS. So this isn’t just contention with another user application, it’s conflicting with the OS.

@joeyespo
Copy link
Owner

Oh, it actually does allow a different port. The syntax is simply

$ grip 8080

or

$ grip AUTHORS.md 8080

to run with a different file.

Thanks for your interest, @klmr!

@klmr
Copy link
Author

klmr commented Jun 29, 2014

Sure, but I’d like to make this configurable so that I can simply use grip and don’t have to specify the port every time.

@joeyespo joeyespo added this to the 2.1 milestone Jun 29, 2014
@joeyespo
Copy link
Owner

Oh ok, gotcha. Apologies.

Re-opening this as an enhancement. The default port is currently Flask's default. I'm not sure it's worth changing that, but it's definitely worth having a .griprc or something.

This work will tie in nicely with #38, which also involves moving user-level files to the right place.

@joeyespo joeyespo reopened this Jun 29, 2014
@joeyespo
Copy link
Owner

A configuration file is now available with the changes made for #38 and #61.

You can now change the default port by creating a ~/.grip/settings.py file and adding PORT = 8080 (or whatever port you want to use).

This has also been documented in 4f91f11.

Hope this helps!

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

No branches or pull requests

2 participants