Welcome to p2pworld — a modern, modular, and developer-friendly peer-to-peer (P2P) networking library for TypeScript.
npm install p2pworld
import { P2PNode } from 'p2pworld';
const node = new P2PNode({ port: 9000 });
node.on('peer:connect', (peer) => {
console.log('Connected to peer:', peer.id);
});
node.start();
Clone the repo and install dependencies:
git clone https://github.com/YOUR_GITHUB_USERNAME/p2pworld.git
cd p2pworld
npm install
Generate documentation:
npm run docs
Run tests:
npm test
Contributions are welcome! Please open issues and pull requests.
If you like this project, please star the repo and share it with others!