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

example tide bug #11

Closed
www159 opened this issue Apr 13, 2023 · 1 comment
Closed

example tide bug #11

www159 opened this issue Apr 13, 2023 · 1 comment

Comments

@www159
Copy link

www159 commented Apr 13, 2023

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(())
}
...
@Valerioageno
Copy link
Owner

Valerioageno commented Mar 3, 2024

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

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

No branches or pull requests

2 participants