How To
Goal-oriented recipes for the Bare runtime itself—migrating an existing Node.js app, and embedding Bare in a native or mobile app.
How-tos are goal-oriented recipes. Each one assumes you already know roughly what you're doing and just need the steps for a particular task—porting an existing Node.js app, or embedding Bare in a React Native app.
If you want to look up an API or a module, that's Reference. For the conceptual "why," see About Bare.
Everything here is about the Bare runtime itself—its module system, its lifecycle, and embedding it in a native host. For the peer-to-peer building blocks that run on top of Bare (connecting peers, replicating data, streaming media), see the how-to guides on the P2P tab. If you're building or shipping a Pear app instead—staging, seeding, provisioning, updating—those guides are on the Pear tab.
Pear is the platform on top. Install the pear CLI when you want peer-to-peer app distribution, over-the-air updates, and one command to stage and release—the core you write here moves across unchanged. Start on the Pear tab, or read How the stack fits together.
P2P is the peer-to-peer building blocks. Hypercore, Hyperswarm, Autobase, Hyperbee, Hyperdrive, HyperDHT, and Corestore—independent JavaScript modules for storage, discovery, and replication, with their own docs on the P2P tab. How the stack fits together maps the layers.
In this section
- Migrate a Node.js app to Bare—port an existing Node.js app to run on Bare.
- Troubleshoot common issues—fixes for common P2P, Pear, and Bare development issues.