Backend server for the PeerRTC module. This server is used as the signaling server for clients coming from the PeerRTC clients. This server can also be used as a temporary storage for client related data and payloads.
- Add credits and attribution to this website when using the backend server.
- This module is still in beta phase and can be unstable.
- Source code contributions and bug reports are encouraged.
- Install Node.js first. Skip this step if already installed.
- Clone this repository.
- In command line, navigate to root directory of the newly downloaded repository.
- Install all needed dependencies via
npm install
in the command line. - Start the server by entering
npm start
in the command line.
Server configurations can be modified in the server/config.json
as found here.
host
: string
- A string host address to be used by the server.
port
: number
- The port number the server will be using.
isClientIdsPublic
: boolean
- Whether all client ids are retrievable by all of the connected peer. Public payloads can also be retrieved if this flag is set to true.
Admin related methods however are exempted by this flag because it caan retrieve all client's data.
clientMaxUnreachableTime
: number
- The maximum time in milliseconds a client is unreachable by the backend server through ping before disconnecting it. Setting this flag to negative number
means unlimited maximum unreachable time.
clientMaxConnectionTime
: number
- The maximum time in milliseconds a client can remain connected in a server before disconnecting it. Setting this flag to negative number
means unlimited maximum connection time.
allowPayloadStoring
: boolean
- Whether to allow storing both public and private payloads from clients. Set this to false if there is no plan of storing payloads to prevent unauthorized data storage.
displayErrors
: boolean
- Whether to display error messages when errors occur in command line.
verificationHash
: string
- The sha256 hash of the key that are used in admin related api in PeerRTC client. Setting
this flag to empty string means that admin related task are disabled.