1 unstable release
0.9.1 | Sep 22, 2022 |
---|---|
0.9.0 |
|
#989 in HTTP server
9KB
190 lines
poem-spa
This crate provides an Endpoint for poem web framework that serves an SPA from static files.
Unlike StaticFilesEndpoint this endpoint will serve an index file for all paths that don't match an actual file.
Assets folders can be defined that will return 404 response for any requests that don't match files inside them.
Example
Route::new()
.nest("/",
SPAEndpoint::new("./site", "index.html")
.with_assets("static")
)
License
This code is licensed under the MIT License.
Dependencies
~14–25MB
~376K SLoC