mirror of
https://github.com/fluencelabs/examples
synced 2024-12-04 19:20:17 +00:00
fix the different modules issue with workspaces and npm 7
This commit is contained in:
parent
08ab2a0ac4
commit
38c3afb545
@ -1,30 +1,37 @@
|
||||
# IPFS code execution example
|
||||
|
||||
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
|
||||
|
||||
## Learn about AquaIPFS
|
||||
|
||||
See [Aqua Book](https://doc.fluence.dev/aqua-book/libraries/aqua-ipfs).
|
||||
|
||||
## How to run & use this example
|
||||
|
||||
You need npm v7 or later to run the examples
|
||||
|
||||
### Web example
|
||||
|
||||
1. Run it
|
||||
|
||||
```
|
||||
cd web
|
||||
npm i
|
||||
npm start
|
||||
npm start -w web
|
||||
```
|
||||
|
||||
2. Press "deploy"
|
||||
3. Copy WASM service CID and press "get_size"
|
||||
|
||||
### NodeJS example
|
||||
|
||||
```
|
||||
cd nodejs
|
||||
npm i
|
||||
npm start
|
||||
npm start -w nodejs
|
||||
```
|
||||
|
||||
## Aqua implementation
|
||||
The business logic is implemented in Aqua in [process.aqua](aqua/aqua/process.aqua)
|
||||
|
||||
The business logic is implemented in Aqua in [process.aqua](aqua/aqua/process.aqua)
|
||||
|
@ -4,8 +4,8 @@
|
||||
"description": "An example of executing WASM code from IPFS over IPFS files",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"postinstall": "../service/scripts/build.sh && npm run build",
|
||||
"compile-aqua": "aqua -i aqua -o src",
|
||||
"postinstall": "../service/scripts/build.sh",
|
||||
"compile-aqua": "aqua -m ../node_modules -i aqua -o src",
|
||||
"build": "npm run compile-aqua && tsc"
|
||||
},
|
||||
"keywords": [
|
||||
|
6960
aqua-examples/aqua-ipfs-integration/package-lock.json
generated
6960
aqua-examples/aqua-ipfs-integration/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,10 @@
|
||||
"name": "aqua-ipfs-integration",
|
||||
"workspaces": [
|
||||
"aqua",
|
||||
"nodjes",
|
||||
"nodejs",
|
||||
"web"
|
||||
]
|
||||
],
|
||||
"scripts": {
|
||||
"build": "npm run build -w aqua -w nodejs -w web"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user