Demo WebServer App
Currently in DRAFT
This is a demo WebApp written in Rust
- Frontend: written in Rust and compilled to WebAssembly
- Backend TBD
Prerequisite
Note: Rust nightly is mandatory for webassembly
Have rust nightly installed:
rustup install nightly
Switch to nightly version:
rustup default nightly
Add the native WebAssembly Rust compilation target
rustup target add wasm32-unknown-unknown
Install cargo web:
cargo install cargo-web
Check installatio and rust version with:
rustup show
Build
Run
Run frontend webserver locally
cargo web start -p frontend --target wasm32-unknown-unknown
Run backend webserver locally
cargo run -p backend
Usage
Frontend
Open web browser on http://localhost:8000
Backend
Get version info
curl -X GET http://localhost:3000/
Create User
curl -X POST http://localhost:3000/user -d '{"user": "toto"}'
TODO
- Link frontend to backend
- DockerFile
- Add opentracing func
- Propagate opentracing header