Generate App
For example, taking a default microservice app with a baseName of ms
created with jh import-jdl --inline "application { config { applicationType microservice, baseName ms } }"
Add HTML File
Add a file src/main/docker/central-server-config/localhost-config/example.html
:
<html><body><h1>${configserver.name}</h1></body></html>
Start the JHipster Registry
Start the JHipster Registry with docker-compose -f src/main/docker/jhipster-registry.yml up -d
which will serve the config and HTML file we created.
Request the HTML File
To access this file through the JHipster Registry, you can use the following URL. Any variables in the templates will be replaced with the config variable present in the JHipster Registry config file. The format is: http://user:password@registry-url:8761/config/app-name/profile/git-label/example.html
:
curl http://admin:admin@localhost:8761/config/ms/prod/master/example.html
Which will return:
<html><body><h1>Docker JHipster Registry</h1></body></html>