quarkus-quickstarts icon indicating copy to clipboard operation
quarkus-quickstarts copied to clipboard

I need serving static resources

Open Amilcar34 opened this issue 1 year ago • 10 comments
trafficstars

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?

Amilcar34 avatar Apr 26 '24 00:04 Amilcar34

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

phillip-kruger avatar Apr 26 '24 01:04 phillip-kruger

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

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

Amilcar34 avatar Apr 26 '24 01:04 Amilcar34

Please can you share a reproducer app ?

phillip-kruger avatar Apr 26 '24 03:04 phillip-kruger

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

Amilcar34 avatar Apr 26 '24 14:04 Amilcar34

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 ?

phillip-kruger avatar Apr 27 '24 00:04 phillip-kruger

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

Amilcar34 avatar Apr 27 '24 02:04 Amilcar34

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

phillip-kruger avatar Apr 27 '24 02:04 phillip-kruger

  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

Amilcar34 avatar Apr 29 '24 16:04 Amilcar34

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 ?

phillip-kruger avatar Apr 29 '24 23:04 phillip-kruger

Sorry for insisting but any help?

Amilcar34 avatar May 15 '24 00:05 Amilcar34