-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathspin.toml
90 lines (82 loc) · 1.93 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
80
81
82
83
84
85
86
87
88
89
spin_manifest_version = "1"
name = "finicky-whiskers"
version = "1.1.0"
trigger = { type = "http", base = "/" }
# Serve static files
[[component]]
id = "fileserver"
source = "components/fileserver.wasm"
files = [{ source = "site/dist", destination = "/" }]
[component.trigger]
route = "/..."
[component.build]
workdir = "site"
command = "make"
# Redirect / to /index.html
[[component]]
id = "redirect-to-index"
source = "components/redirect.wasm"
environment = { DESTINATION = "/index.html" }
[component.trigger]
route = "/"
executor = { type = "wagi" }
[component.build]
workdir = "redirect"
command = "make"
watch = ["**/*.go", "go.mod"]
# Tally an individual event
[[component]]
id = "tally"
source = "components/tally.wasm"
key_value_stores = ["default"]
[component.trigger]
route = "/tally"
[component.build]
workdir = "tally"
command = "make"
watch = ["src/**/*.rs", "Cargo.toml"]
# Initialize session data
[[component]]
id = "session"
source = "components/sessionv2.wasm"
[component.trigger]
route = "/session"
[component.build]
workdir = "sessionv2"
command = "make build"
watch = ["src/**/*.ts", "package.json"]
# Get the scores for a particular game
[[component]]
id = "scoreboard"
source = "components/scoreboard.wasm"
key_value_stores = ["default"]
[component.trigger]
route = "/score"
[component.build]
workdir = "scoreboard"
command = "make"
watch = ["src/**/*.rs", "Cargo.toml"]
# Stores highscores in key/value
[[component]]
id = "highscore"
source = "components/highscore.wasm"
sqlite_databases = ["default"]
[component.trigger]
route = "/highscore"
[component.build]
workdir = "highscore"
command = "make"
watch = ["src/**/*.rs", "Cargo.toml"]
# Component to reset all state
[[component]]
id = "reset"
source = "components/reset.wasm"
allowed_http_hosts = []
key_value_stores = ["default"]
sqlite_databases = ["default"]
[component.trigger]
route = "/reset"
[component.build]
workdir = "reset"
command = "make"
watch = ["src/**/*.rs", "Cargo.toml"]