With an WASI-enabled Docker, you just need one line of command to build and run the HTTP server example. For details, refer to the Dockerfile and docker-compose.yml files.
docker compose build
docker compose run --no-TTY -p 8080:8080 server-warp
Next, you can jump directly to the Test section. If you want to build and run the application step by step on your own system, read on.
cargo build --target wasm32-wasi --release
wasmedge target/wasm32-wasi/release/wasmedge_warp_server.wasm
Run the following from another terminal.
$ curl http://localhost:8080/
Try POSTing data to /echo such as: `curl localhost:8080/echo -XPOST -d 'hello world'`
$ curl http://localhost:8080/echo -X POST -d "WasmEdge"
WasmEdge