Skip to main content
Module

x/earthstar_replica_server/mod.node.ts

An always-online Earthstar peer for your shares.
Latest
import * as earthstarReplicaServer from "https://deno.land/x/earthstar_replica_server@4.0.0-beta.1/mod.node.ts";

Classes

An extension for populating a replica server with known shares. Use this to specify which shares you'd like your replica server to sync with others.

An extension for exposing the contents of shares, so that you can request documents by their path and have them served over HTTP. Can be used to create wikis, websites, image galleries, and more.

An extension which enables synchronisation with pre-v7 Earthstar peers. Useful if you want to migrate Earthstar data from older clients to new one, or if you just want to keep using pre-v7 Earthstar clients.

An extension which enables synchronisation over the web via HTTP.

A ready-made replica server populated with shares from a local list, and HTTP sync.

  • It will look for the known shares list at ./known_shares.json
  • The sync endpoint is at <hostname>/earthstar-api/v2

An extensible replica server able to synchronise with other peers.

The core replica server logic. Combine this with a HTTP framework to create a fully-fledged replica server.

Interfaces

  • sourceShare: The share to use as the source of documents. Must have been created by another extension.
  • path: An optional path prefix for requests. E.g. /stuff means a call to /stuff/blog.md would fetch /blog.md from the replica.
  • indexPath: A fallback path to use when none is provided. Useful for landing pages.
  • allowOrigins: A list of origins allowed by CORS, if you want other sites to be able to request content from your replica server.

Implement this interface to create a replica server extension.