Skip to content

Commit

Permalink
Merge pull request #182 from spinkube/tpmccallum-patch-2
Browse files Browse the repository at this point in the history
Update to reflect new app manifest that templates now creates
  • Loading branch information
bacongobbler authored Jul 8, 2024
2 parents 2b9ed68 + 5eef99f commit 90791ac
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions content/en/docs/spin-trigger-mqtt/installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,34 @@ The `address`, `username`, `password` and `topic` support the ability to b
The application manifest will look similar to the following:

```
spin_manifest_version = "1"
authors = ["Fermyon Engineering <[email protected]>"]
description = "Demo app to receive MQTT messages."
spin_manifest_version = 2
[application]
name = "mqtt-app"
trigger = { type = "mqtt", address = "mqtt://localhost:1883", username = "user", password = "password", keep_alive_interval = "30" }
version = "0.1.0"
authors = ["Fermyon Engineering <[email protected]>"]
description = "Demo app to receive MQTT messages."
[[component]]
id = "mqtt-app"
[application.trigger.mqtt]
address = "mqtt://localhost:1883"
username = "user"
password = "password"
keep_alive_interval = "30"
[[trigger.mqtt]]
component = "mqtt-app"
topic = "mytopic"
qos = "1"
[component.mqtt-app]
source = "target/wasm32-wasi/release/mqtt_app.wasm"
allowed_outbound_hosts = ["mqtt://localhost:1883"]
[component.trigger]
topic = "topic"
qos = "1"
[component.build]
[component.mqtt-app.build]
command = "cargo build --target wasm32-wasi --release"
```

To build the application we use the `spin build` command:

```bash
$ spin build
```
```

0 comments on commit 90791ac

Please sign in to comment.