Skip to content

Commit fc55f21

Browse files
committed
add pre-requisites section and clarification between nodejs and script tag usage
1 parent baf6677 commit fc55f21

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

docs/documentation/getting-started.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,26 @@ import TabItem from '@theme/TabItem'
1010

1111
## About *bee-js*
1212

13-
`bee-js` simplifies development on Swarm by abstracting away many of finer details and quirks of the Bee API so that you can focus on building your dream DAPP with minimal hassle. It's the easiest way to get started developing on Swarm.
13+
`bee-js` simplifies development on Swarm by abstracting away many of finer details and quirks of the Bee API so that you can focus on building your dream DAPP with minimal hassle.
1414

15-
## Installation
15+
:::info
16+
On this page you will learn how to install `bee-js` and connect it with your existing app or webpage.
17+
:::
18+
19+
20+
## Pre-requisites
21+
22+
- **A live Bee node API endpoint:**
23+
You will need the API endpoint from a live Bee node to use `bee-js`. See the Bee docs for [node installation instructions](https://docs.ethswarm.org/docs/bee/installation/quick-start/).
24+
- **Linux or macOS:** A Unix based operating system is preferred. Windows is supported with some small exceptions. For a smoother experience, Windows users can use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)
25+
- **Node.js (v18 or higher)** - [Get Node.js](https://nodejs.org/)
26+
- **npm (Node Package Manager)** - [Get npm](https://docs.npmjs.com/)
27+
28+
:::tip
29+
Node.js and npm are not required if you choose to import `bee-js` directly as a script from [unpkg.com](https://unpkg.com/@ethersphere/bee-js/dist/index.browser.min.js).
30+
:::
31+
32+
## Installation
1633

1734
<Tabs
1835
groupId="pcgmng_preferrence"
@@ -45,11 +62,9 @@ yarn add @ethersphere/bee-js --save
4562
</TabItem>
4663
</Tabs>
4764

48-
After that you need to import the `Bee` class and initialize an instance of it using our Bee node's API endpoint (here we assume it runs on localhost on the default port).
65+
### Node.js (npm or yarn)
4966

50-
:::info Run your own Bee node
51-
You can find out more about setting up a Bee node and getting your node's API endpoint in the [Bee docs](https://docs.ethswarm.org/docs/installation/quick-start)
52-
:::
67+
After that you need to import the `Bee` class and initialize an instance of it using our Bee node's API endpoint (here we assume it runs on localhost on the default port).
5368

5469
```js
5570
import { Bee } from "@ethersphere/bee-js"
@@ -59,7 +74,7 @@ const bee = new Bee('http://localhost:1633')
5974

6075
That’s it! now you can use the `bee` object.
6176

62-
:::tip Using `<script>` import
77+
### Script Tag
6378

6479
If you include `bee-js` using the `unpkg.com` script link then all the exported components will be available to you
6580
under global namespace `BeeJs`:
@@ -70,7 +85,7 @@ under global namespace `BeeJs`:
7085
const bee = new BeeJs.Bee('...')
7186
</script>
7287
```
73-
:::
88+
7489

7590

7691
## Quickstart with *create-swarm-app*

0 commit comments

Comments
 (0)