quarkiverse / quarkus-quinoa

Quinoa is a Quarkus extension which eases the development, the build and serving of single page apps (built with NodeJS: React, Angular, …) alongside Quarkus . It is possible to use it with a Quarkus backend in a single project
Apache License 2.0
84 stars 41 forks source link

Quick start example fails to serve UI from production package. #763

Closed dajester2013 closed 2 months ago

dajester2013 commented 2 months ago

Describe the bug

Using the latest Quarkus CLI + Quinoa, tried to set up the example app, but it fails to run correctly when packaged.

Quinoa version

2.4.7

Quarkus version

3.14.4

Build / Runtime

Vite

Package Manager

NPM

Steps to reproduce the behavior

Used SDKMAN! to install the latest quarkus CLI, and configured a new project according to the README:

$ sdk install quarkus
....
$ quarkus create app quinoa-app -x=io.quarkiverse.quinoa:quarkus-quinoa
-----------
selected extensions: 
- io.quarkiverse.quinoa:quarkus-quinoa

applying codestarts...
πŸ“š java
πŸ”¨ maven
πŸ“¦ quarkus
πŸ“ config-properties
πŸ”§ tooling-dockerfiles
πŸ”§ tooling-maven-wrapper
πŸš€ quinoa-codestart

-----------
[SUCCESS] βœ…  quarkus project has been successfully generated in:
--> [edited]/quinoa-app
-----------
Navigate into this directory and get started: quarkus dev
$ cd quinoa-app/
$ quarkus build
$ java -jar target/quarkus-app/quarkus-run.jar
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2024-09-17 07:47:40,938 INFO  [io.quarkus] (main) quinoa-app 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.14.4) started in 0.622s. Listening on: http://0.0.0.0:8080
2024-09-17 07:47:40,945 INFO  [io.quarkus] (main) Profile prod activated. 
2024-09-17 07:47:40,946 INFO  [io.quarkus] (main) Installed features: [cdi, quinoa, smallrye-context-propagation, vertx]

Navigate to localhost:8080/ image

Expected behavior

Expected example app UI to be served.

melloware commented 2 months ago

Because it didn't want to interfere with the index.html that is already there don't you want the URL http://localhost:8080/quinoa.html ???

That is where the CodeStart is serving from?

dajester2013 commented 2 months ago

@melloware this is the production package, not the dev mode - according to the documentation, it is supposed to serve from http://localhost:8080

Even then, I get the same response from http://localhost:8080/quinoa.html

Was trying to follow these steps:

Build your app:

$ quarkus build
$ java -jar target/quarkus-app/quarkus-run.jar

It’s done! The web application is now built alongside Quarkus, dev-mode is available, and the generated files will be automatically copied to the right place and be served by Quinoa if you hit http://localhost:8080/

melloware commented 2 months ago

let me try it.

melloware commented 2 months ago

@ia3andy he is correct the Prod mode of the Code Start does not work.

melloware commented 2 months ago

@dajester2013 i see its served here http://localhost:8080/quinoa/

image

dajester2013 commented 2 months ago

Roger that - can confirm. I tried /quinoa, /quinoa.html, but not /quinoa/. Dev mode serves from /quinoa btw.

melloware commented 2 months ago

Cool in normal scenario Not The CodeStart this all just works and serves from localhost:8080 we just do this special handling for /quinoa so we don't interfere with the index.html that may be from other extensions etc.