Crates.io | poem-spa |
lib.rs | poem-spa |
version | 0.9.1 |
source | src |
created_at | 2022-09-22 19:38:26.456071 |
updated_at | 2022-09-22 19:43:43.609634 |
description | This crate provides an Endpoint for poem web framework that serves an SPA from static files. |
homepage | |
repository | https://github.com/bdew/poem-spa |
max_upload_size | |
id | 671961 |
size | 8,273 |
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.
Route::new()
.nest("/",
SPAEndpoint::new("./site", "index.html")
.with_assets("static")
)
This code is licensed under the MIT License.