import { type IReplicaServerExtension } from "https://deno.land/x/earthstar_replica_server@4.0.0-beta.1/mod.node.ts";
Implement this interface to create a replica server extension.
register
is called once by the replica server, and this is where you can get a reference to its underlyingEarthstar.Peer
.handler
is called by the replica server when it is trying to fulfil a server request. If your extension does not interact with user requests you can returnPromise.resolve(null)
.