I am really excited to learn vert.x, however, coming from a whole different world (Golang, NodeJS), I do not see *exactly how* to make vert.x read configuration from the environment.
http://vertx.io/blog/vert-x-application-configuration should provide an example that instead of reading from a configuration json file, it instead gets the variable from the environment. Our company never uses configuration files, and always configures from environment.
I know that it *should* be obvious, and maybe it's the whiskey, maybe it's the lack of sleep, but I don't understand how to make the server listen on port 8082 reading from the environment's PORT value.
Thank you in advance!
ConfigStoreOptions store = new ConfigStoreOptions();
store.setType("env");
ConfigRetrieverOptions options = new ConfigRetrieverOptions()
.addStore(store);
ConfigRetriever retriever = ConfigRetriever.create(vertx, options);
vertx.createHttpServer()
.requestHandler(router::accept)
.listen(
config().getInteger("PORT", 9999),
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/83859b14-3334-4805-a3f7-8b4db8901e7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.