cescoffier / vertx-microservices-workshop

Vert.x Microservices Hand's on lab
http://escoffier.me/vertx-hol/
Apache License 2.0
330 stars 196 forks source link

src/conf/config.json? #8

Open dmitriid opened 8 years ago

dmitriid commented 8 years ago

The problem

6.4 in the docs reads:

This command launch the application. The main class we used creates a clustered Vert.x instance and read the configuration from src/conf/config.json. This configuration provides the HTTP port on which the REST service is published (35000).

Let’s now open a browser and have a look to http://localhost:35000.

Unfortunately:

If the reader is required to change configs (to add http.port) and add reading configs to the code, it's not stated anywhere.

However, even adding http.port to quote-generator/src/conf/config.json and config().getInteger("http.port", 8080) to RestQuoteAPIVerticle doesn't help.

When the service starts, it never reads the config, config() returns {}.

Request

Please extend the tutorial with:

cescoffier commented 7 years ago

@dmitriid The port issue has been fixed - it's now reading the port from the config file.

I will add a section about the 'config support'. It's there for simplification, but actually it does not simplify much.... To pass another configuration just use -conf path/to/config.json.

dmitriid commented 7 years ago

Awesome!