jbang-examples icon indicating copy to clipboard operation
jbang-examples copied to clipboard

Add Quarkus multi file script example.

Open pjgg opened this issue 4 years ago • 3 comments
trafficstars

Quarkus Cryptocurrency example:

Features tested:

  • Multi-file script
  • External file configuration
  • Dependencies version from Bom
  • Quarkus/vertx
  • OpenAPI

pjgg avatar Feb 12 '21 16:02 pjgg

its nice with a multi file example but i'm not sure user will know what to do.. localhost:9090 just shows error and non of the /api/ end points seem to do anything.

Some basic docs/info - maybe in form of a embedded index.html ?

maxandersen avatar Feb 13 '21 23:02 maxandersen

So I've pushed an Html page that uses the script endpoints. With this example, the end-user just have to run the main script:

jbang stockCryptoCurrency.java

Then go to http://localhost:9090 on their browser, and from there they will load all cryptocurrency names (by default they don't have to do anything)... this is the heaviest part from a network point of view. Then, they could click over the names and get the current stock market value....in Euros, Bitcoins, and US dollars.

Note: Also this command should work

jbang https://github.com/pjgg/jbang-examples/blob/example/quarkus-multifile/examples/quarkus-cryptocurrency/stockCryptoCurrency.java

Amazing!!! @maxandersen

pjgg avatar Feb 18 '21 16:02 pjgg

i missed this one - does the example actually work for you now ? I'm wondering if something broke on jbang side or the script itself?

index.html just says "Loading...." for me ?

maxandersen avatar Dec 26 '21 00:12 maxandersen