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

API: Serve static files #41

Closed
j-mueller opened this issue Jan 6, 2025 · 1 comment · Fixed by #45
Closed

API: Serve static files #41

j-mueller opened this issue Jan 6, 2025 · 1 comment · Fixed by #45

Comments

@j-mueller
Copy link
Collaborator

  • Add a catch-all route to the API (type Servant.API.Raw)
  • This route should serve the contents of the saStaticFiles folder
    • If the folder is Nothing throw a ServerError
  • The handler can use Servant.Server.StaticFiles.serveDirectoryWebApp

The final API should look something like this

type ServerAPI =
  "api" :> "v1" :> APIInEra -- this is the API we already have
  :<|> Raw -- anything else
@j-mueller j-mueller changed the title Serve static files API: Serve static files Jan 6, 2025
@j-mueller j-mueller linked a pull request Jan 6, 2025 that will close this issue
@j-mueller
Copy link
Collaborator Author

@choener : You can base #46 on this PR

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 a pull request may close this issue.

1 participant