Valerioageno/ssr-rs

example `tide` bug

www159 opened this issue · 1 comments

thanks for amazing work.
however, there are errors when runing example tide
the src:

...
async fn main() -> tide::Result<()> {
    let mut app = tide::new();
    app.at("/styles/*").serve_dir("client/dist/ssr/styles/")?;
    app.at("/images/*").serve_dir("client/dist/ssr/images/")?;
    app.at("/scripts/*").serve_dir("client/dist/client/")?;
    app.at("/*").get(return_html);
    app.listen("127.0.0.1:8080").await?;
    Ok(())
}
...

It should be:

...
async fn main() -> tide::Result<()> {
    let mut app = tide::new();
    app.at("/styles/").serve_dir("client/dist/ssr/styles/")?;
    app.at("/images/").serve_dir("client/dist/ssr/images/")?;
    app.at("/scripts/").serve_dir("client/dist/client/")?;
    app.at("/").get(return_html);
    app.listen("127.0.0.1:8080").await?;
    Ok(())
}
...

Hey @www159, sorry for the very late reply. I've just release a new crate version. Thanks for the suggestion. Updated.