Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/earthstar/src/entries/node.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.2.0/src/entries/node.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)