-
Notifications
You must be signed in to change notification settings - Fork 0
/
spin.toml
79 lines (68 loc) · 2.21 KB
/
spin.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# spin_version = "1"
spin_manifest_version = "1"
authors = ["lshoo <[email protected]>"]
description = "Things and thinks about lshoo"
name = "htmx-example"
trigger = { type = "http", base = "/" }
version = "1.0.5"
[[component]]
id = "blog"
source = "api/blog/target/wasm32-wasi/release/blog.wasm"
key_value_stores = ["default"]
[component.trigger]
route = "/api/blog/..."
[component.build]
command = "cargo build --target wasm32-wasi --release"
workdir = "api/blog"
watch = ["api/blog/src/**/*.rs", "api/blog/Cargo.toml", "spin.toml"]
[[component]]
id = "timeline"
source = "api/timeline/target/wasm32-wasi/release/timeline.wasm"
key_value_stores = ["default"]
[component.trigger]
route = "/api/timeline/..."
[component.build]
command = "cargo build --target wasm32-wasi --release"
workdir = "api/timeline"
watch = ["api/timeline/src/**/*.rs", "api/timeline/Cargo.toml", "spin.toml"]
[[component]]
# source = { url = "https://github.com/fermyon/spin-fileserver/releases/download/v0.0.2/spin_static_fs.wasm", digest = "sha256:65456bf4e84cf81b62075e761b2b0afaffaef2d0aeda521b245150f76b96421b" }
source = "modules/spin_static_fs.wasm"
id = "web"
files = [ { source = "web/dist", destination = "/" } ]
[component.trigger]
route = "/..."
[component.build]
command = "npm run build"
workdir = "web"
# htmx example
# [[component]]
# id = "htmx-example"
# source = "target/wasm32-wasi/release/htmx_example.wasm"
# allowed_http_hosts = ["0.0.0.0:8000"]
# [component.trigger]
# # route = "/..."
# route = "/htmx"
# [component.build]
# command = "cargo build --target wasm32-wasi --release"
# watch = ["src/**/*.rs", "Cargo.toml"]
# [[component]]
# id = "clicked"
# source = "htmx/clicked/target/wasm32-wasi/release/clicked.wasm"
# allowed_http_hosts = []
# [component.trigger]
# route = "/htmx/clicked"
# [component.build]
# command = "cargo build --target wasm32-wasi --release"
# workdir = "htmx/clicked"
# watch = ["src/**/*.rs", "Cargo.toml"]
# [[component]]
# id = "gohome"
# source = "/htmx/gohome/target/wasm32-wasi/release/go_home.wasm"
# allowed_http_hosts = []
# [component.trigger]
# route = "/htmx/gohome"
# [component.build]
# command = "cargo build --target wasm32-wasi --release"
# workdir = "htmx/gohome"
# watch = ["src/**/*.rs", "Cargo.toml"]