-
Notifications
You must be signed in to change notification settings - Fork 25
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
support for static content / html middleware? #8
Comments
Hi Eric, This should be easily implemented as a piece of middleware, and as such probably belongs in Meddle.jl. It could be used from Morsel like so to serve assets in a folder called using Morsel
import Meddle: StaticAssetService
app = Morsel.app()
namespace(app, "/static", StaticAssetService("assets"))
start(app, PORT) Pull requests welcome! (We'll probably get to this eventually anyways, though.) |
This middleware already exists in Meddle actually! It is called |
Well there you go! This goes to show how bad our public documentation is ;). We're working on fixing this! |
That said, we should test this with Morsel as @zachallaun outlined above - reopening as an integration test / documentation issue. |
gr8, thanks very much On Thu, Aug 29, 2013 at 10:58 AM, Daniel Mendel [email protected]:
|
This is basically a follow up to the issue above (sorry if this is a dumb question): When you create a Morsel app is it possible to specifiy additional middleware (such as FileServer) without modifying the hard coded stack in the start function of Morsel.jl (https://github.com/JuliaWeb/Morsel.jl/blob/master/src/Morsel.jl#L216)? There is a function that seems like it does exactly this (https://github.com/JuliaWeb/Morsel.jl/blob/master/src/Morsel.jl#L99-L111) but I am not sure what the thunk function should be... |
Hello,
Do you plan on having support for serving html pages + other static content? Or is that something to be implemented in a separate Middleware Module?
The text was updated successfully, but these errors were encountered: