spin/examples/spin-wagi-http
qtfkwk 94830e10a2
Update README.md
Fix typo

Signed-off-by: qtfkwk <qtfkwk@users.noreply.github.com>
2023-05-12 12:21:10 -04:00
..
http-rust chore: Update wagi examples 2022-11-29 13:29:30 +06:00
wagi-http-cpp feat: add `spin build` command 2022-04-27 00:06:10 +03:00
README.md Update README.md 2023-05-12 12:21:10 -04:00
spin.toml chore: update examples and templates to spin_manifest_version 2023-03-08 12:06:03 -05:00

README.md

Spin Wagi HTTP example

This example shows how to run a Spin application serving routes from two programs written in different languages (Rust and C++) using both the Spin executor and the Wagi executor.

Compile Applications to Wasm

cd http-rust
cargo build --release
cd ../wagi-http-cpp
make build

Spin up

From application root:

RUST_LOG=spin=trace spin up -f spin.toml

Curl the hello route:

$ curl -i localhost:3000/hello
HTTP/1.1 200 OK
content-type: application/text
content-length: 7
date: Thu, 10 Mar 2022 21:38:34 GMT

Hello

Curl the goodbye route:

$ curl -i localhost:3000/goodbye
HTTP/1.1 200 OK
foo: bar
content-length: 7
date: Thu, 10 Mar 2022 21:38:58 GMT

Goodbye