flat-piano-13282
04/16/2023, 5:40 AMshuttle-static-folder. In the 0.14 release, there's a note that the static folder must be placed in the workspace root.
So, if I build the frontend project and output to dist/ what do I specify in the shuttle_static_folder::StaticFolder annotation? I was using "dist" and it worked for cargo shuttle run when it was at backend/dist/ "../dist" doesn't seem to work.flat-piano-13282
04/16/2023, 5:41 AMagreeable-painting-48846
04/16/2023, 7:41 AMagreeable-painting-48846
04/16/2023, 7:43 AM(folder = "dist") in the static folder macro and it should let you use your compiled frontendgentle-ice-1561
04/16/2023, 1:30 PMflat-piano-13282
04/16/2023, 3:30 PMagreeable-painting-48846
04/16/2023, 4:57 PMagreeable-painting-48846
04/16/2023, 4:58 PMflat-piano-13282
04/17/2023, 12:08 AMgentle-ice-1561
04/17/2023, 12:10 AMgentle-ice-1561
04/17/2023, 12:17 AMcargo build in the root build both crates for you? In that case, you might want to set backend as the default workspace member. That should cause only that one to get built. Worth trying at least.flat-piano-13282
04/17/2023, 5:00 PMtoml
[workspace]
members = ["backend", "frontend"]
default-members = ["backend"]
My frontend dependencies (from it's Cargo.toml) are:
toml
[dependencies]
yew = { version = "0.20.0", features = ["csr"] }
wasm-bindgen = "0.2"
js-sys = "0.3.61"
web-sys = "0.3.61"
serde = { version = "1.0.159", features = ["derive"] }
wasm-bindgen-futures = "0.4"
serde-wasm-bindgen = "0.4"
gloo-console = "0.2.3"
gloo-net = { version = "0.2.6", features = ["json"] }
gloo-storage = "0.2.2"
serde_json = "1.0.95"
yew-router = "0.17.0"
reqwest = { version = "0.11.16", features = ["json"] }
anyhow = "1.0.70"
lazy_static = "1.4.0"
yewtube = "0.1.1"
Which I don't think has anything shuttle related.flat-piano-13282
04/17/2023, 5:01 PMdist/ to the workspace root for use by the static folder annotation. That's a bit awkward, however, since dist/ needs to be copied into backend/ too for it it to run locallygentle-ice-1561
04/17/2023, 5:17 PMagreeable-painting-48846
04/17/2023, 8:43 PMkind-area-3810
04/20/2023, 7:17 AMkind-area-3810
04/20/2023, 7:21 AMkind-area-3810
04/20/2023, 7:23 AMflat-piano-13282
04/21/2023, 1:39 PMmembers, not sure if that's expected.
Can you describe how the path will be different in deployment? My confusion is around it needing to be in different places during cargo shuttle run (in the same directory as the Cargo.toml for the backend crate) vs cargo shuttle deploy (in the workspace root, the parent directory of the backend crate)kind-area-3810
04/21/2023, 2:16 PMkind-area-3810
04/21/2023, 2:17 PM#[shuttle_static_folder] path: Pathbufflat-piano-13282
04/24/2023, 1:41 AMcargo shuttle deploy from the backend crate directory. cargo shuttle run works from thereflat-piano-13282
04/24/2023, 1:42 AMflat-piano-13282
04/24/2023, 1:44 AM{response="LoadResponse { success: false, message: \"Custom error: failed to provision shuttle_static_folder :: StaticFolder\", resources: [] }"} shuttle_deployer::deployment::run: loading responseflat-piano-13282
04/24/2023, 5:29 PM