LiveLists
In general, the infrastructure consists of three parts:
1) Self-hosted server
2) Client SDK - library for your client project
3) Server SDK - library for your server project
To use the project you must deploy self-hosted server in own infrastructure and install client and server SDKs to your projects.
The server is an application written in Go.
Application containerized in docker image, so you can run it using docker. You can also run the application by compiling the sources from the GitHub repository linked at the top of the page. To do this, Go lang must be installed on your device, and you must also specify the correct configuration file.
Also, in addition to the server, you should deploy MongoDB instance.
Below is an example of docker compose file which runs the livelists-server and MongoDB
docker-compose.yaml
This file runs MongoDB version 6.0.3 (this version well-tested for working with LiveLists), and open connection to database on 57217 port.
Also this file run LiveLists server it opens it on port 17771 and 17772. Using volumes it apply settings from external config to container. The contents of this configuration file are described below
config.yaml
By default container expose two ports:
7771 (clientPort) - a web socket connection to the Client SDK is open on this port
7772 (adminPort) - a RPC service opens on this port. This service accepts the request from Server SDK.
7771 and 7772 is default ports, but you can change it by specifying other ports.
api_key and secret_key - random strings that you must specify yourself. Keep these keys securely this keys used to authorize requests from server SDK. Also
It is highly desirable (especially for WebSocket), that your connection inside TLS tunnel. You can provide a TSL connection by using a third party proxy.
Below is an example of an Nginx block, which proxies requests to server ports.
default
To manage the service using server SDK. You must initialize the clients by passing the apiKeys and admin service host (adminPort) to them.
LiveListsClient.ts
To work with the client SDK you must specify the client host (clientPort).