Skip to content

Release v0.1.3

Choose a tag to compare

@zot zot released this 06 Nov 07:13
· 35 commits to main since this release

Changes in v0.1.3

API Simplification

  • New function: Simplified initialization from 3 steps to 1 line
    // Before: 3 lines
    const client = new IPFSWebAppClient();
    const [peerID, peerKey] = await client.connect();
    
    // Now: 1 line
    const client = await connect();
    // Access: client.peerID, client.peerKey
  • Renamed client: IPFSWebAppClient → P2PWebAppClient (better name!)
  • Property getters: client.peerID and client.peerKey for easy access

Documentation Updates

  • Fixed all "serve" command references throughout docs
  • Simplified opening example from 4 lines to 3 lines
  • Updated all code examples to use new API
  • Cleaner API reference tables

Usage

Simply run the binary to start the server:

./p2p-webapp          # Start server (opens browser)
./p2p-webapp --noopen # Start without opening browser
./p2p-webapp -v       # Start with verbose logging

All other commands (extract, bundle, ls, cp, ps, kill, killall, version) continue to work as before.

Quick Start

import { connect } from './client.js';

const client = await connect();
await client.subscribe('my-chat', (peer, data) => console.log(data));
await client.publish('my-chat', { text: 'Hello!' });

Downloads

Choose the binary for your platform:

  • Linux: p2p-webapp-linux-amd64
  • Windows: p2p-webapp-windows-amd64.exe
  • macOS Intel: p2p-webapp-darwin-amd64
  • macOS Apple Silicon: p2p-webapp-darwin-arm64