47 lines
981 B
Markdown
Raw Permalink Normal View History

# IPFS code execution example
> The build and deploy instructions as well as some of the Aqua code are
> outdated and the deployed services are no longer available. An updated version
> will be available soon.
2023-03-01 05:53:58 -07:00
2021-07-21 11:37:25 +03:00
This example showcases 2 things:
1. how it's possible to store .wasm modules on IPFS, then deploy them to Fluence
as a service
2. ability to process IPFS files via a Fluence service. In this example, we get
a size of a file
2021-07-21 11:37:25 +03:00
## Learn about AquaIPFS
2022-10-26 11:43:31 +03:00
See [Aqua Book](https://fluence.dev/docs/aqua-book/introduction).
## How to run & use this example
You need npm v7 or later to run the examples
### Web example
2021-07-21 11:37:25 +03:00
1. Run it
```bash
npm i
npm run build -w aqua
npm start -w web
```
2021-07-21 11:37:25 +03:00
2. Press "deploy"
3. Copy WASM service CID and press "get_size"
### NodeJS example
```bash
npm i
npm run build -w aqua
npm start -w nodejs
```
2021-07-21 11:37:25 +03:00
## Aqua implementation
The business logic is implemented in Aqua in
[process.aqua](aqua/aqua/process.aqua)