cargo-wasm
cargo-wasm copied to clipboard
Start a local server to avoid CORS restrictions
On my machine the example doesn't work because the Fetch API is disabled on file URLs. If I start a server like http and access via localhost:3000 then it does work. I'm not sure if there is any other way to get around the restriction.
Agh CORS strikes again. I've had this happen with non-wasm projects before and frankly it's annoying even if it is a good thing to have for security reasons.
I don't think there is a way to avoid, maybe just running a python like simple server and just hosting the files might be a good alternative to the way run currently works.