Start Emulator
The Flow Emulator is a lightweight development tool that mimics the behavior of the real Flow network. It is bundled with the Flow CLI, which makes starting and configuring the emulator straightforward.
Initial Configuration
The emulator requires a configuration file (flow.json
). If you don’t already have one, create it using the flow init
command:
This initializes a default configuration file that the emulator will use.
Starting the Emulator
To start the emulator with default settings, use the following command:
This will start the emulator with the configuration defined in flow.json
.
Example Output
When you run the flow emulator
command, you will see output similar to the following:
Customizing the Emulator
You can customize the emulator behavior by using flags. Here are some examples:
Change the gRPC and REST API ports:
Enable persistence of state across restarts:
Enable detailed logs for debugging:
For a complete list of available flags, run:
Learn More
To explore advanced features like snapshots, rollbacks, and debugging, visit the Flow Emulator README.