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

Create src/folder.jl to handle serving of Folder() #280

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cstjean
Copy link

@cstjean cstjean commented Jan 10, 2025

Hi! So I took your example from discourse and made it work for my use case. Works great! Sorry that it's in a rough state but I wanted to push this draft before the weekend to get some quick feedback, if you have time.

One of the unfortunate part is that if I serve it as route!(server, r"/docs/.*" => Folder(joinpath(@__DIR__, "../../MyPackage/build"))), then because of the joinpath, it will lookup /docs/index.html in MyPackage/build/docs/index.html (whereas I want the path to be MyPackage/build/index.html). It's kinda OK, I guess I can use a symlink to get around that, but if you have an elegant proposal I'd be happy to implement it.

TODO:

  • Test
  • Docstring / docs

Thanks!

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

Successfully merging this pull request may close these issues.

1 participant