mirror of
https://github.com/fluencelabs/examples
synced 2025-07-31 00:41:56 +00:00
chore(js-client): Update and restructure examples [fixes DXJ-454] (#464)
* Update examples * Update js-client examples * Add cli to example * Fixes * Update js-client * Update js-client version in js-client examples * PR fixes * Remove marine-js * Update locks * Fix aqua * Remove unused import * Adjust import * Change code comment * Update example structures * Fix quickstart examples * Add aqua command to README * Add marine example * Fix image links * Fixes * Misc fixes
This commit is contained in:
@@ -2,14 +2,28 @@
|
||||
|
||||
This is a sample Node.js application using Fluence JS Client. It exposes a calculator service written in Typescript which can be accessed from Fluence Network using Aqua language
|
||||
|
||||
> To run this example you need `@latest` version of Fluence CLI. You can find installation guide [here](https://github.com/fluencelabs/cli).
|
||||
|
||||
## Getting started
|
||||
|
||||
Go to `src/frontend` folder:
|
||||
|
||||
```bash
|
||||
cd ./src/frontend
|
||||
```
|
||||
|
||||
Install dependencies:
|
||||
|
||||
```bash
|
||||
npm i
|
||||
```
|
||||
|
||||
Run aqua compiler:
|
||||
|
||||
```bash
|
||||
fluence aqua
|
||||
```
|
||||
|
||||
Start the Node.js application:
|
||||
|
||||
```bash
|
||||
@@ -18,10 +32,10 @@ npm start
|
||||
|
||||
This should start listening to incoming particles from Fluence Network.
|
||||
|
||||
Try interacting with the application with some aqua:
|
||||
Open another terminal window and go to the example dir. Try interacting with the application by executing aqua function:
|
||||
|
||||
```bash
|
||||
./run_calculation.sh
|
||||
fluence run -f 'demoCalculation()'
|
||||
```
|
||||
|
||||
## Learn more
|
||||
|
Reference in New Issue
Block a user