Skip to main content
Module

x/earthstar/src/entries/deno.ts>ExtensionServeContent

Storage for private, distributed, offline-first applications.
Go to Latest
class ExtensionServeContent
implements IServerExtension
import { ExtensionServeContent } from "https://deno.land/x/earthstar@v10.0.2/src/entries/deno.ts";

A server 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: Peer | null
private
replica: Replica | null
private
sourceShare: string

Methods

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