-
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
update README to clarify the built file should be ran from the root folder. #52
Comments
I tried to reproduce the bug based on the information provided, following these steps:
The button works fine. Could you please clarify with the steps you took to build and serve the application that led to the issue? Thanks. |
Ok here`s what i ran. cargo leptos new --git leptos-rs/start-axum
cd {name of the project}
cargo leptos build --release
cd target/release
./{name of the project}
|
When I follow your steps, I get 404s in the browser console for the JS, WASM, and CSS files, and I then This is because the static file server (which is included in the app, it lives in user code that you control) uses paths relative to the current working directory — when you run the binary from |
Oh, that makes total sense. |
Or preferably change it so that it doesn't search for the files from the directory its ran but searches for them relative to its location on disc ? |
I think it's pretty important to clarify that the code that does this is entirely under your control, in The template works as described in the README, which includes instructions on how to run it with or without cargo-leptos. Note that the instructions for running it without cargo-leptos explicitly say that you should have your |
ok i c that All I`m saying is that it wasn't immediately obvious having read the README that that was how it worked and I thought it would improve the docs. |
Looking trough the code at fileserve.rs leads to site_root: String The path of the all the files generated by cargo-leptos. This defaults to ‘.’ for convenience when integrating with other tools. Which isn’t in and of itself even that clear, relative to what that "." Is. I really think the documentation could benefit from some further clarification on all this. I will make a branch and clarify, although I think you be better suited to comment the code aswell. ps. pss. Psss. |
When building the template with the release tag,
the site is generated but pressing the increment button doesn`t work.
When more complexity is added to the site it also doesn`t work.
I`ll attach a file with system info.
bugreport.txt
The text was updated successfully, but these errors were encountered: