mirror of
https://github.com/fluencelabs/gitbook-docs
synced 2025-06-12 06:21:33 +00:00
GitBook: [2.0.0] 31 pages and 15 assets modified
This commit is contained in:
committed by
gitbook-bot
parent
3cf0b95f72
commit
849d9bbd44
@ -14,9 +14,9 @@ And run the application with:
|
||||
npm start
|
||||
```
|
||||
|
||||
Which will open a new browser tab at `http://localhost:3000` . Following the instructions, we connect to any one of the displayed relay ids, open another browser tab also at `http://localhost:3000`, select a relay and copy and paste the client peer id and relay id into corresponding fields in the first tab and press the `say hello` button.
|
||||
Which will open a new browser tab at `http://localhost:3000` . Following the instructions, we connect to any one of the displayed relay ids, open another browser tab also at `http://localhost:3000`, select a relay and copy and paste the client peer id and relay id into corresponding fields in the first tab and press the `say hello` button.
|
||||
|
||||

|
||||

|
||||
|
||||
The result looks familiar, so what's different? Let's have a look at the Aqua file. Navigate to the `aqua/getting_started.aqua` file in your IDE:
|
||||
|
||||
@ -35,7 +35,7 @@ Before we dive into the `sayHello` function, let's look at why we still need a l
|
||||
|
||||
* The function signature \(18\) takes two arguments: `targetPeerId`, which is the client peer id of the other browser and the `targetelayPeerId`, which is the relay id -- both parameters are the values you copy and pasted from the second browser tab into the first browser tab
|
||||
* The first step is to call on the hosted service `HelloWorld` on the host peer `helloWorldPeerId` , which we specified in line 1
|
||||
* We bind the `HelloWorld` interface, on the peer `helloWorldPeerId`, i.e.,`12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi`, to the service id of the hosted service `helloWorldServiceId` , i.e. `1e740ce4-81f6-4dd4-9bed-8d86e9c2fa50`, which takes the %init\__peer\__id% parameter, i.e., the peer id of the peer that initiated the request, and pushes the result into `comp` \(20-22\)
|
||||
* We bind the `HelloWorld` interface, on the peer `helloWorldPeerId`, i.e.,`12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi`, to the service id of the hosted service `helloWorldServiceId` , i.e. `1e740ce4-81f6-4dd4-9bed-8d86e9c2fa50`, which takes the %init\_\_peer\_\_id% parameter, i.e., the peer id of the peer that initiated the request, and pushes the result into `comp` \(20-22\)
|
||||
* We now want to send a result back to the target browser \(peer\) \(25-26\) using the local service via the `targetRelayPeerId` in the background as a `co` routine.
|
||||
* Finally, we send the `comp` result to the initiating browser
|
||||
|
||||
|
@ -39,7 +39,7 @@ With Docker and VSCode in place:
|
||||
* When asked for volume, press enter \(unique\)
|
||||
* Open Terminal in VSCode \(ctrl-\`\)
|
||||
|
||||

|
||||

|
||||
|
||||
Congratulations, you now have a fully functional Fluence development environment. For a variety of container management options, click on the `Dev Container: Fluence` button in the lower left of your tool bar:
|
||||
|
||||
|
Reference in New Issue
Block a user