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

Add host address env var override and update README #127

Merged
merged 2 commits into from
Jul 21, 2020

Conversation

vicchi
Copy link
Contributor

@vicchi vicchi commented Jul 16, 2020


Here's the reason for this change 🚀

  • Added support for overriding the default network address to bind to via the HOST environment variable, in line with (almost) all of the other Pelias services.

Here's what actually got changed 👏

  • Update index.js adding support for the HOST env var and passing this to app.listen()
  • Small update to README.md documenting this

Here's how others can test the changes 👀

Without HOST defined ...

PORT=4100 npm start
<snip>
2020-07-16T15:29:14.509Z - info: [placeholder] [worker 92474] listening on 0.0.0.0:4100
sudo lsof -i -P -n | grep LISTEN | grep 4100
node      92601          pelias   36u  IPv6 513692      0t0  TCP *:4100 (LISTEN)

With HOST defined ...

HOST=127.0.0.1 PORT=4100 npm start
<snip>
2020-07-16T15:31:23.397Z - info: [placeholder] [worker 92745] listening on 127.0.0.1:4100
$ sudo lsof -i -P -n | grep LISTEN | grep 4100
node      92737          pelias   36u  IPv4 501663      0t0  TCP 127.0.0.1:4100 (LISTEN)

@orangejulius
Copy link
Member

Sweet. I'm sure lots of folks will appreciate having this configurable everywhere!

@orangejulius orangejulius merged commit ee72127 into pelias:master Jul 21, 2020
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.

2 participants