quarkusio / quarkus-quickstarts

Quarkus quickstart code
https://quarkus.io
Apache License 2.0
1.92k stars 1.43k forks source link

I need serving static resources #1419

Open Amilcar34 opened 2 months ago

Amilcar34 commented 2 months ago

I read this post

https://quarkus.io/guides/http-reference#from-a-local-directory

but I can't get my app to have this behavior

https://repo1.maven.org/maven2/

¿Is it possible for quarkus to have a navigation as an nginx server in static folder?

phillip-kruger commented 2 months ago

Why can you not get quarkus to serve static files ? It should work like described in the documentation. What error do you get ?

Amilcar34 commented 2 months ago

Hi phillip, I don't see the content that should be there

https://modest-flowing-snapper.ngrok-free.app/

phillip-kruger commented 2 months ago

Please can you share a reproducer app ?

Amilcar34 commented 2 months ago

Hi Phillip

https://github.com/Amilcar34/tu-emisora

Project In Java: 17 Maven: 3.9.3

Inizialize whit mvn eclipse:eclipse clean install quarkus:dev

phillip-kruger commented 2 months ago

Ok so this is working for me. You have a lot of places where you have an index.html. The one that works is in /static (on the same level as src). That is how it's intended to work. Why are you saying it's not working ?

Amilcar34 commented 2 months ago

In principle, I thank you very much for the follow-up you are giving me.

To enter http://localhost:8080/ I don't see the index.html file as it looks like this:

https://repo1.maven.org/maven2/zw/co/paynow/java-sdk/1.1.1/

I see white screen:

2024-04-26_23-10

phillip-kruger commented 2 months ago

That is because your index.html is empty. But it returns fine (200 OK). Try adding some html markup to the file

Amilcar34 commented 2 months ago
  1. I want to thank you again for following up on my case.
  2. I will be clearer about the cause of my problem, this conversation was misunderstood.
  3. I do NOT want to see the content of the index.html file in this path. I want to see the content directory (image example) 2024-04-26_23-10
phillip-kruger commented 2 months ago

So you want to have a directory listing rather than the rendered html. I am not sure how this can be done. @cescoffier can this be done with vertx-http extension ?

Amilcar34 commented 1 month ago

Sorry for insisting but any help?