qiuxiafei/zk-web

Doesn't support Environment Variable PORT

Closed this issue · 5 comments

Trying to use zk-web with foreman but doesn't support changing the port number based on environment variable.

why not edit the config file?

Short Answer: http://12factor.net/
:)

Also, foreman will pass a PORT environment variable to be used and it would be nice to be able to use foreman. Foreman, will also spit out upstart files, systemd files which makes running my tools much easier. I'm happy to contribute a change that will allow both the config file and the env var.

it would be nice if u can contribute.

Ok, cool beans. Are you ok if I pull in the environ package? https://github.com/weavejester/environ

If it can be achieved by simply wrap System.getEnv(), don't introduce unnecessary external library.^_^