A very simple automerge-repo synchronization server. It pairs with the
websocket client protocol found in
@automerge/automerge-repo-network-websocket
.
The server is an unsecured Express app. It is partly for demonstration purposes but it's also a reasonable way to run a public sync server.
npx @automerge/automerge-repo-sync-server
The server is configured with environment variables. There are two options:
PORT
- the port to listen for websocket connections onDATA_DIR
- the directory to store saved documents inUSE_HTTPS
-"true"
if server should use https/wss; requiresHTTPS_CERT
andHTTPS_KEY
to be configuredHTTPS_CERT
- path to SSL certificateHTTPS_KEY
- path to SSL certificate key
Originally written by @pvh.