Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I need serving static resources #1419

Open
Amilcar34 opened this issue Apr 26, 2024 · 10 comments
Open

I need serving static resources #1419

Amilcar34 opened this issue Apr 26, 2024 · 10 comments

Comments

@Amilcar34
Copy link

Amilcar34 commented Apr 26, 2024

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
Copy link
Member

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

@Amilcar34
Copy link
Author

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

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

@phillip-kruger
Copy link
Member

Please can you share a reproducer app ?

@Amilcar34
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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

@Amilcar34
Copy link
Author

  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
Copy link
Member

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
Copy link
Author

Sorry for insisting but any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants