Skip to content

Commit 7445992

Browse files
authored
Merge pull request #47 from quyumkehinde/feat/add-fwf-examples
feat: add fwf examples
2 parents 0ca31c5 + 026bda6 commit 7445992

16 files changed

+485
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
title = "Cookie based A/B Testing"
2+
template = "render_hub_content_body"
3+
date = "2025-01-24T00:00:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "Rust"]
6+
7+
[extra]
8+
author = "Thorsten Hans"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "Rust"
12+
created_at = "2025-01-21T13:50:00Z"
13+
last_updated = "2025-01-21T13:50:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "A Spin application showcasing how to implement A/B testing based on a cookie."
16+
url = "https://github.com/fermyon/fwf-examples/tree/main/samples/ab-testing-cookie"
17+
keywords = "Rust, HTTP"
18+
19+
---
20+
21+
This sample application shows how you can use a Spin application to implement A/B testing based on a cookie.
22+
23+
## Prerequisites
24+
25+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
26+
27+
- The `spin` CLI
28+
- Rust tools and the `wasm32-wasip1` target
29+
- The `aka` plugin for `spin` CLI
30+
- Access to _Fermyon Wasm Functions_
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
title = "KeyValue based A/B Testing"
2+
template = "render_hub_content_body"
3+
date = "2025-01-24T00:00:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "Rust", "key value"]
6+
7+
[extra]
8+
author = "Thorsten Hans"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "Rust"
12+
created_at = "2025-01-21T13:50:00Z"
13+
last_updated = "2025-01-21T13:50:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "A Spin application showcasing how to implement A/B testing based on data in a Key Value store."
16+
url = "https://github.com/fermyon/fwf-examples/tree/main/samples/ab-testing-kv"
17+
keywords = "Rust, HTTP, Key Value"
18+
19+
---
20+
21+
This sample application shows how you can use a Spin application to implement A/B testing based on a cookie.
22+
23+
## Prerequisites
24+
25+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
26+
27+
- The `spin` CLI
28+
- Rust tools and the `wasm32-wasip1` target
29+
- The `aka` plugin for `spin` CLI
30+
- Access to _Fermyon Wasm Functions_
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
title = "User Agent based A/B Testing"
2+
template = "render_hub_content_body"
3+
date = "2025-01-24T00:00:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "Rust"]
6+
7+
[extra]
8+
author = "Thorsten Hans"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "Rust"
12+
created_at = "2025-01-21T13:50:00Z"
13+
last_updated = "2025-01-21T13:50:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "A Spin application showcasing how to implement A/B testing based on the user agent."
16+
url = "https://github.com/fermyon/fwf-examples/tree/main/samples/ab-testing-user-agent"
17+
keywords = "Rust, HTTP"
18+
19+
---
20+
21+
This sample application shows how you can use a Spin application to implement A/B testing based on a cookie.
22+
23+
## Prerequisites
24+
25+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
26+
27+
- The `spin` CLI
28+
- Rust tools and the `wasm32-wasip1` target
29+
- The `aka` plugin for `spin` CLI
30+
- Access to _Fermyon Wasm Functions_
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
title = "Aggregate JSON"
2+
template = "render_hub_content_body"
3+
date = "2025-01-20T00:00:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "typescript"]
6+
7+
[extra]
8+
author = "Fermyon"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "JS/TS"
12+
created_at = "2025-01-20T00:00:00Z"
13+
last_updated = "2025-01-20T00:00:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "Shows how to make concurrent outgoing requests and aggregate the responses."
16+
url = "https://github.com/fermyon/fwf-examples/tree/main/samples/aggregate-json"
17+
keywords = "TypeScript, HTTP"
18+
19+
---
20+
21+
This sample shows how to make concurrent outgoing HTTP requests and combine the results.
22+
23+
## Prerequisites
24+
25+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
26+
27+
- The `spin` CLI
28+
- A recent version of `npm`
29+
- The `aka` plugin for `spin` CLI
30+
- Access to _Fermyon Wasm Functions_
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title = "Altering Response Headers"
2+
template = "render_hub_content_body"
3+
date = "2025-01-20T00:00:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "typescript"]
6+
7+
[extra]
8+
author = "Fermyon"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "JS/TS"
12+
created_at = "2025-01-20T00:00:00Z"
13+
last_updated = "2025-01-20T00:00:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "Shows how to alter response headers."
16+
url = "https://github.com/fermyon/fwf-examples/tree/main/samples/alter-headers"
17+
keywords = "TypeScript, HTTP"
18+
19+
---
20+
21+
This sample application shows how to alter the headers as you stream a response from an origin
22+
server back to a client.
23+
24+
## Prerequisites
25+
26+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
27+
28+
- The `spin` CLI
29+
- A recent version of `npm`
30+
- The `aka` plugin for `spin` CLI
31+
- Access to _Fermyon Wasm Functions_
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
title = "Autocomplete API"
2+
template = "render_hub_content_body"
3+
date = "2025-01-24T00:00:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "Rust"]
6+
7+
[extra]
8+
author = "Thorsten Hans"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "Rust"
12+
created_at = "2025-01-21T13:50:00Z"
13+
last_updated = "2025-01-21T13:50:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "Implement an autocomplete API using Spin and Rust."
16+
url = "https://github.com/fermyon/fwf-examples/tree/main/samples/auto-complete/autocomplete"
17+
keywords = "Rust, HTTP"
18+
19+
---
20+
21+
This sample application shows how you can use a Spin application to implement an autocomplete API.
22+
23+
## Prerequisites
24+
25+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
26+
27+
- The `spin` CLI
28+
- Rust tools and the `wasm32-wasip1` target
29+
- The `aka` plugin for `spin` CLI
30+
- Access to _Fermyon Wasm Functions_
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title = "Bulk Redirects"
2+
template = "render_hub_content_body"
3+
date = "2025-01-20T00:00:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "typescript"]
6+
7+
[extra]
8+
author = "Fermyon"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "JS/TS"
12+
created_at = "2025-01-20T00:00:00Z"
13+
last_updated = "2025-01-20T00:00:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "Shows how to redirect requests."
16+
url = "https://github.com/fermyon/fwf-examples/tree/main/samples/bulk-redirects"
17+
keywords = "TypeScript, HTTP"
18+
19+
---
20+
21+
This application shows how you can bulk-redirect requests using a JavaScript object to map inbound routes
22+
to their new locations.
23+
24+
## Prerequisites
25+
26+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
27+
28+
- The `spin` CLI
29+
- A recent version of `npm`
30+
- The `aka` plugin for `spin` CLI
31+
- Access to _Fermyon Wasm Functions_
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title = "HarperDB and 103 Early Hints in Rust"
2+
template = "render_hub_content_body"
3+
date = "2025-01-29T00:00:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "Rust"]
6+
7+
[extra]
8+
author = "Radu Matei"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "Rust"
12+
created_at = "2025-01-29T13:50:00Z"
13+
last_updated = "2025-01-29T13:50:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "This sample showcases using using Fermyon Wasm Functions to query HarperDB for early hints."
16+
url = "https://github.com/fermyon/fwf-examples/tree/main/samples/early-hints-rust"
17+
keywords = "Rust, HTTP"
18+
19+
---
20+
21+
This sample showcases using using Fermyon Wasm Functions to query HarperDB for early hints.
22+
23+
## Prerequisites
24+
25+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
26+
27+
- The `spin` CLI
28+
- Rust tools and the `wasm32-wasip1` target
29+
- The `aka` plugin for `spin` CLI
30+
- Access to _Fermyon Wasm Functions_
31+
- Access to a HarperDB instance
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
title = "Tutorial: Using the Key Value Store"
2+
template = "render_hub_content_body"
3+
date = "2025-01-21T13:50:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "Javascript", "key value"]
6+
7+
[extra]
8+
author = "Thorsten Hans"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "JS/TS"
12+
created_at = "2025-01-21T13:50:00Z"
13+
last_updated = "2025-01-21T13:50:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "The sample application written as part of the Using the Key Value Store tutorial."
16+
url = "https://github.com/fermyon/enterprise-architectures-and-patterns/tree/main/cqrs-rust"
17+
keywords = "Javascript, HTTP, Key Value"
18+
19+
---
20+
21+
This sample application was written as part of the [Using the Key Value Store](https://wasm-functions.fermyon.app/wasm-functions/using-key-value-store) tutorial. It showcases how to use the Spin Key-Value store from a Javascript-based Spin application, and guides you on installing it to Fermyon Wasm Functions on Akamai.
22+
23+
## Prerequisites
24+
25+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
26+
27+
- The `spin` CLI
28+
- Node.js (Version `20` or later)
29+
- The `aka` plugin for `spin` CLI
30+
- Access to _Fermyon Wasm Functions_
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
title = "Limit Access"
2+
template = "render_hub_content_body"
3+
date = "2025-01-20T00:00:00Z"
4+
content-type = "text/plain"
5+
tags = ["http", "typescript"]
6+
7+
[extra]
8+
author = "Fermyon"
9+
type = "hub_document"
10+
category = "Sample"
11+
language = "JS/TS"
12+
created_at = "2025-01-20T00:00:00Z"
13+
last_updated = "2025-01-20T00:00:00Z"
14+
spin_version = ">=v3.1.0"
15+
summary = "Shows how to limit access to an origin server."
16+
url = "https://github.com/fermyon/fwf-examples/tree/main/samples/limit-access"
17+
keywords = "TypeScript, HTTP"
18+
19+
---
20+
21+
This sample application shows how to limit access to a given origin until a configuration point in time.
22+
Before that point in time, the Spin application responds to all requests with a configurable status code;
23+
after it, the Spin application acts as a transparent proxy.
24+
25+
## Prerequisites
26+
27+
You need the following tools on your machine, to build, run and deploy the application to _Fermyon Wasm Functions_:
28+
29+
- The `spin` CLI
30+
- A recent version of `npm`
31+
- The `aka` plugin for `spin` CLI
32+
- Access to _Fermyon Wasm Functions_

0 commit comments

Comments
 (0)