-
Notifications
You must be signed in to change notification settings - Fork 459
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
support PORT environment variable #120
Conversation
Add it to the readme too? @cheslip 🎉 |
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.
Looks good 👍
@@ -43,6 +43,12 @@ To run the microservice on port `3000` and localhost instead of listening on eve | |||
$ micro -p 3000 -H localhost sleep.js | |||
``` | |||
|
|||
`micro` also supports using the PORT environment variable to set the port: |
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 would turn PORT into PORT
(wrap it in '`')
Why not |
If done that way it won't default back to |
@cheslip in that case we should make sure we default to |
@rauchg I'll have a look into that 👍 |
yes that should achieve similar behavior, thanks for looking into it |
This enables the use of a
PORT
environment variable that is commonly used with PaaS services such as Heroku and Cloud Foundry. Still defaults to3000
if the env var is not set.