#Is there a way to generate a binary file for a fullstack app and deploy it on a machine

1 messages · Page 1 of 1 (latest)

smoky axle
#

I have the app running with dx serve --fullstack, but wanted to create a binary to deploy it

ebon inlet
#

You should be able to do dx build --platform fullstack --release .

smoky axle
#

I tried doing that. There is a binary in target/release but it running it seems to break with (this is the hackernews tutorial for dioxus)

Listening on 127.0.0.1:8080
thread 'main' panicked at /Users/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dioxus-fullstack-0.5.6/src/serve_config.rs:111:37:
Failed to find index.html. Make sure the index_path is set correctly and the WASM application has been built.: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
vernal panther
#

try to run "dx build" and the generated binary is located at dist/xxx. The xxx is your project name. And then you have to run the binary from project's root path, command should be: "./dist/xxx"

#

The generated result is NOT a single binary. The executable need to locate static resources according out_dir option in Dioxus.toml