Postleaf / postleaf

Simple, beautiful publishing with Node.js.
https://www.postleaf.org/
MIT License
505 stars 203 forks source link

Added 'APP_HOST' config parameter in '.env.example' for 'app.listen' … #77

Closed windware-ono closed 6 years ago

windware-ono commented 6 years ago

…method in '/app.js' to let the node process listen to a certain interface instead of all interfaces.

Pull Request Summary

To listen to all interfaces, set 'APP_HOST' to '0.0.0.0'.


All code contributions are subject to the terms of the Contributor License Agreement described in CONTRIBUTING.md.

claviska commented 6 years ago

Thanks for this, and sorry for the delay (weekend and all).

What's the behavior if APP_HOST doesn't exist? I assume it will it be undefined and, if so, will app.listen still accept the callback as the third argument? I'm mostly just trying to make sure this doesn't introduce a breaking change :)

windware-ono commented 6 years ago

Ah yes, sorry, I added the default behavior in case APP_HOST is not defined to listen to all interfaces (which is what the current released version does).

claviska commented 6 years ago

Perfect, thanks! The only other thing I need to do is add a note to the docs about this. You're welcome to submit another PR if you like, otherwise I'll take care of it this week!