Skip to content

Commit 5f3f040

Browse files
committed
x/wasihttp/examples: add proxy and roundtrip WIT packages to examples
and update the examples docs to refer to the right working directory and command to build. Signed-off-by: Jiaxiao Zhou <[email protected]>
1 parent 5ee95de commit 5f3f040

File tree

8 files changed

+4225
-6
lines changed

8 files changed

+4225
-6
lines changed

x/wasihttp/examples/basic/basic.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// This example implements a basic web server.
22
//
3-
// To run: `tinygo run -target=wasip2-http.json ./examples/basic`
3+
// working direcotry: "./x/wasihttp/examples"
4+
// To run: `tinygo run -target=wasip2-http.json ./basic`
45
// Test /: `curl -v 'http://0.0.0.0:8080/'`
56
// Test /error: `curl -v 'http://0.0.0.0:8080/error'`
67

x/wasihttp/examples/counter/counter.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// This example implements a web server with a counter running in a goroutine.
22
// This demonstrates instance reuse by the host.
33
//
4-
// To run: `tinygo run -target=wasip2-http.json ./examples/counter`
4+
// working directory: "./x/wasihttp/examples"
5+
// To run: `tinygo run -target=wasip2-http.json ./counter`
56
// Test /: `curl -v 'http://0.0.0.0:8080/'`
67

78
package main

0 commit comments

Comments
 (0)