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

src/conf/config.json? #8

Open
dmitriid opened this issue Aug 12, 2016 · 2 comments
Open

src/conf/config.json? #8

dmitriid opened this issue Aug 12, 2016 · 2 comments

Comments

@dmitriid
Copy link
Contributor

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:

  • RestQuoteAPIVerticle does not read any configuration
  • the server is started with a hardcoded :8080

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:

  • a section on how config files are found by services (and how to place them in a different directory, or resources)
  • code and explanation (at least, for quote generator) showing what changes need to be done to configs for it to work as described in the tutorial
@cescoffier
Copy link
Owner

@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
Copy link
Contributor Author

Awesome!

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

No branches or pull requests

2 participants