fix the different modules issue with workspaces and npm 7

This commit is contained in:
Pavel Murygin 2021-09-10 00:39:14 +03:00
parent 08ab2a0ac4
commit 38c3afb545
4 changed files with 3426 additions and 3562 deletions

View File

@ -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)

View File

@ -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": [

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,10 @@
"name": "aqua-ipfs-integration",
"workspaces": [
"aqua",
"nodjes",
"nodejs",
"web"
]
],
"scripts": {
"build": "npm run build -w aqua -w nodejs -w web"
}
}