Skip to main content
Module

x/earthstar_replica_server/mod.node.ts>ExtensionServeContent

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

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.

Constructors

new
ExtensionServeContent(opts: ExtensionServeContentOpts)

Properties

private
allowedOrigins: string[]
private
indexPath: string | undefined
private
path: string
private
peer: Earthstar.Peer | null
private
replica: Earthstar.Replica | null
private
sourceShare: string

Methods

handler(req: Request): Promise<Response | null>
register(peer: Earthstar.Peer)