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

$PORT and process.env.PORT offset by 100 #418

Closed
rvangundy opened this issue Dec 12, 2013 · 4 comments
Closed

$PORT and process.env.PORT offset by 100 #418

rvangundy opened this issue Dec 12, 2013 · 4 comments

Comments

@rvangundy
Copy link

I'm starting a couple processes with Foreman. In my node.js process, I refer to process.env.PORT. In my Procfile, I use $PORT as a parameter to another process. My second process is only for debugging and basically processes some files and opens up my browser to the specified port (it's not using the port for anything else). So if I start Foreman with foreman start --port=5000, process.env.PORT is 5100 while $PORT is 5000. Shouldn't these be the same value?

@rvangundy
Copy link
Author

Looking through the issues found pull #110 makes this behavior intentional. So my issue then is how to determine one process's assigned port from another process. Maybe outside the scope of Foreman altogether. Though I would like to hear some thoughts/suggestions as to how to handle this kind of thing in the context of Foreman.

@ddollar
Copy link
Owner

ddollar commented Apr 22, 2014

These should be the same value, any other behavior is likely a bug.

@ddollar
Copy link
Owner

ddollar commented Apr 22, 2014

If you'd like to create a pull request to address this I'd be happy to take a look. Thanks!

@ddollar ddollar closed this as completed Apr 22, 2014
@RichardOrnelas
Copy link

I just now started to get this issue. i request port 8080 and foreman starts with 8180

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

3 participants