mirror of
https://github.com/fluencelabs/examples
synced 2024-12-04 19:20:17 +00:00
add compose.air
This commit is contained in:
parent
4104c35427
commit
6496dd5331
13
url-downloader/compose.air
Normal file
13
url-downloader/compose.air
Normal file
@ -0,0 +1,13 @@
|
||||
(xor
|
||||
(seq
|
||||
(seq
|
||||
(seq
|
||||
(call relay (curl "download") ["https://fluence.network/img/svg/logo_new.svg"] contents)
|
||||
(call relay (storage "put") ["logo.svg" contents.$.stdout!] ret_code)
|
||||
)
|
||||
(call relay (storage "get") ["logo.svg"] bytes)
|
||||
)
|
||||
(call %init_peer_id% (returnService "run") [ret_code bytes])
|
||||
)
|
||||
(call %init_peer_id% (returnService "run") [%last_error%])
|
||||
)
|
15
url-downloader/deploy_separate.sh
Executable file
15
url-downloader/deploy_separate.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh -euo pipefail
|
||||
|
||||
./build.sh
|
||||
|
||||
echo "Deploying storage"
|
||||
(
|
||||
cd artifacts
|
||||
fldist new_service --name "local_storage" --modules local_storage.wasm:local_storage.json
|
||||
)
|
||||
|
||||
echo "\n\nDeploying curl"
|
||||
(
|
||||
cd artifacts
|
||||
fldist new_service --name "curl_adapter" --modules curl_adapter.wasm:curl_adapter.json
|
||||
)
|
Loading…
Reference in New Issue
Block a user