mirror of
https://github.com/fluencelabs/gitbook-docs
synced 2025-07-29 21:21:57 +00:00
replace JS SDK with Fluence JS
This commit is contained in:
@@ -34,7 +34,7 @@ The main entry point `@fluencelabs/fluence` is `Fluence` facade. It provides eas
|
||||
|
||||
Even though the js-based implementation closely resembles [node](https://github.com/fluencelabs/gitbook-docs/js-sdk/node.md) there are some considerable differences to the latter.
|
||||
|
||||
`FluencePeer` does not host services composed of wasm modules. Instead it allows to register service call handlers directly in javascript. The Aqua language compiler creates a typed helpers for that task. Using Aqua compiler is strongly advised when working with JS SDK.
|
||||
`FluencePeer` does not host services composed of wasm modules. Instead it allows to register service call handlers directly in javascript. The Aqua language compiler creates a typed helpers for that task.
|
||||
|
||||
Due to the limitations of browser-based environment `FluencePeer` cannot be discovered by it's Peer Id on it's own. To overcome this `FluencePeer` must use an existing node which will act as a `relay`. When a peer is connected through a relay it is considered to be `client`. The `FluencePeer` routes all it's particle through it's relay thus taking advantage of the peer discovery implemented on the node. A particle sent to the connected client must be routed through it's relay.
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
## Intro
|
||||
|
||||
In this section we will show you how JS SDK can be used to create a hello world application with Fluence stack.
|
||||
In this section we will show you how Fluence JS can be used to create a hello world application with Fluence stack.
|
||||
|
||||
## Aqua code
|
||||
|
||||
@@ -167,6 +167,6 @@ node -r ts-node/register src/index.ts
|
||||
|
||||
If everything has been done correctly yuo should see `Hello, world!` in the console.
|
||||
|
||||
The next section will cover in-depth and advanced usage JS SDK
|
||||
The next section will cover in-depth and advanced usage of Fluence JS
|
||||
|
||||
The code from this section is available in on [github](https://github.com/fluencelabs/examples/tree/main/js-sdk-examples/hello-world)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
## Intro
|
||||
|
||||
In this section we will cover the JS SDK in-depth.
|
||||
In this section we will cover the Fluence JS in-depth.
|
||||
|
||||
## Fluence
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Running app in browser
|
||||
|
||||
You can use the JS SDK with any framework \(or even without it\). The "fluence" part of the application is a collection of pure typescript\javascript functions which can be called withing any framework of your choosing.
|
||||
You can use the Fluence JS with any framework \(or even without it\). The "fluence" part of the application is a collection of pure typescript\javascript functions which can be called withing any framework of your choosing.
|
||||
|
||||
See the browser-example which demonstrate integrating Fluence with React: [github](https://github.com/fluencelabs/examples/tree/main/js-sdk-examples/browser-example)
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
## Intro
|
||||
|
||||
JS SDK makes it easy to run applications in NodeJS environment. You can take full advantage of the javascript ecosystem and at the save time expose service to the Fluence Network. That makes is an excellent choice for quick prototyping of applications for Fluence Stack.
|
||||
It is easy to use Fluence JS in NodeJS applications. You can take full advantage of the javascript ecosystem and at the save time expose service to the Fluence Network. That makes is an excellent choice for quick prototyping of applications for Fluence Stack.
|
||||
|
||||
## Calc app example
|
||||
|
||||
|
Reference in New Issue
Block a user