B · Launching Effectstream + Local Dev · PRE-WORK
First launch
One command boots two blockchains, a database, the sync node, a batcher, and the frontend. First run downloads the Midnight binaries — give it a few minutes and good Wi-Fi.
▼ details below
1Start the stack
cd templates/evm-midnight-v2
bun run dev
What the orchestrator launches, in dependency order:
expected log milestones (cold start: 1–3 min; warm restart: ~10 s)
✓ compile-evm-contracts exited successfully ✓ deploy-evm-contracts exited successfully ✓ midnight-contract exited successfully [sync] [APPLY MIGRATION] Block height: 0 | Migration: 000-init.sql [sync] Paima Engine HTTP server running on http://127.0.0.1:9999 ✓ frontend-build exited successfully ● frontend-server running in background
2Poke it
curl -s localhost:9999/api/erc721
expected
[]
Empty array = the sync node is up, the migrations ran, and the API answers.
Then open http://localhost:10599 in your browser — the template's demo dApp should load. If both the curl and the page work, the full stack is alive.
3The orchestrator is your dev loop
During the workshop you'll edit node code and restart just the sync process. Run the stack as a daemon instead:
bunx orchestrator stop # always stop the foreground run first (frees ports)
bunx orchestrator start --background
bunx orchestrator status # what's running
bunx orchestrator logs sync # follow one process's logs
bunx orchestrator restart sync # <- you'll type this a lot in Section C
bunx orchestrator stop # tear everything down
Golden rule
Always bunx orchestrator stop before starting again — leftover processes keep ports
(8545, 9944, 9999, 10599…) and the next launch fails confusingly.
| Port | What |
|---|---|
| 10599 | frontend |
| 9999 | sync node REST API |
| 3334 | batcher |
| 8545 / 8546 | Hardhat EVM (main / parallel) |
| 9944 / 8088 / 6300 | Midnight node / indexer / proof server |
| 4747 | orchestrator API (when daemonized) |
Checkpoint — pre-work done
curl -s localhost:9999/api/erc721 returns [] and
bunx orchestrator status shows sync, batcher, and frontend running.
Stuck? See Troubleshooting.