Running a Bee node is essential for building decentralized applications on the Swarm network. However, as a developer, it is often convenient to work in an environment where interactions with the node/network can be tested rapidly and without putting the node’s storage data or the user’s tokens at risk.
In this article, we’ll explore three safe and risk-free options available for developers to simulate a Bee node running on Swarm primarily for testing and development:
- Run Bee in developer mode
- Run a local network with Bee Factory
- Run a local network with FDP Play
Whether you’re a beginner or an experienced developer, these options will help you get started with Swarm quickly. So let’s dive in!
Option 1: Run Bee in Developer Mode
When a Bee node is run in developer mode, it creates an instance with volatile persistence and mocked backends which makes this mode highly advantageous for experimenting and testing out various Bee node features. Any changes made to the node’s state are temporary and discarded when the node is stopped. As a result, there is no impact on real-world data or assets, making this mode an ideal option for developers looking to experiment with the Bee node.
Prerequisites
- Ports
1633and1635must be free and available
Step 1: Install bee on your system
- Using the Installer packages
- Ubuntu/Debian (*.deb)
- CentOS (*.rpm)
- MacOS (brew)
- Use the installer script which automatically detects your execution environment and installs the latest stable version of
beeon your computer- Linux (bee-linux-*)
- MacOS (bee-darwin-*)
- Windows (bee-windows-*)
- Build from source on all systems.
You can download the most recent bee packages here: https://github.com/ethersphere/bee/releases/latest
Step 2: Start Bee in dev mode
Open a terminal window and run:
bee dev
( * ) (
)\ ) ( * ( /( )\ )
(()/( ( ( ( )\))( )\())(()/( (
/(_)) )\ )\ )\ ((_)()\ ((_)\ /(_)) )\
(_))_ ((_) ((_)((_) (_()((_) ((_)(_))_ ((_)
| \ | __|\ \ / / | \/ | / _ \ | \ | __|
| |) || _| \ V / | |\/| || (_) || |) || _|
|___/ |___| \_/ |_| |_| \___/ |___/ |___|
Starting in development mode
"time"="2023-03-08 13:55:59.008839" "level"="info" "logger"="node/localstore" "msg"="database capacity" "chunks"=1000000 "~size(GB)"=20.29025
"time"="2023-03-08 13:55:59.008726" "level"="info" "logger"="node" "msg"="starting debug api server" "address"="[::]:1635"
"time"="2023-03-08 13:55:59.022163" "level"="info" "logger"="node" "msg"="starting api server" "address"="[::]:1633"
Great! Our bee node is now running in dev mode. You can now safely interact with all of its API endpoints. Any changes to the node’s state resulting from your interactions will only be persisted to volatile memory.
