forked from spinframework/spin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request spinframework#921 from etehtsea/upd-examples
chore: Update examples
- Loading branch information
Showing
12 changed files
with
99 additions
and
144 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Spin component in TinyGo | ||
|
||
```shell | ||
$ RUST_LOG=spin=trace spin build --up | ||
``` | ||
|
||
The application can now receive requests on `http://localhost:3000`: | ||
|
||
```shell | ||
$ curl -i localhost:3000 | ||
HTTP/1.1 200 OK | ||
content-length: 23 | ||
date: Tue, 29 Nov 2022 06:59:24 GMT | ||
|
||
message: I'm a teapot | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
spin_version = "1" | ||
authors = ["Fermyon Engineering <[email protected]>"] | ||
description = "A simple Spin application written in (Tiny)Go that performs outbound HTTP requests." | ||
name = "spin-hello-tinygo" | ||
name = "spin-tinygo-outbound-http" | ||
trigger = { type = "http", base = "/" } | ||
version = "1.0.0" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Spin component in TinyGo | ||
|
||
```shell | ||
$ RUST_LOG=spin=trace spin build --up | ||
``` | ||
|
||
The application can now receive requests on `http://localhost:3000/publish`: | ||
|
||
```shell | ||
$ curl -i localhost:3000/publish | ||
HTTP/1.1 200 OK | ||
content-length: 67 | ||
date: Tue, 29 Nov 2022 07:03:52 GMT | ||
|
||
mykey value was: myvalue | ||
spin-go-incr value: 1 | ||
deleted keys num: 2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Spin component in TinyGo | ||
|
||
```shell | ||
$ RUST_LOG=spin=trace spin build --up | ||
``` | ||
|
||
```shell | ||
$ redis-cli | ||
127.0.0.1:6379> PUBLISH messages test-message | ||
(integer) 1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.