Skip to main content

RootServer

RootServer = object

This type is your entry point to most of the Root server-side APIs. Root automatically creates an instance of this type and provides it for your use. You import the instance and access its properties.

Properties

clients

clients: AttachedClients

Represents community members who currently have your app's channel open. Provides methods to query attached members and events to track attachment changes.


community

community: object

Represents the community where your code is installed. Provides an API to manipulate the community (e.g., create channels or send messages) and events to notify you when things in the community change (e.g., message sent or new member joins).

accessRules

accessRules: AccessRuleClient

channelDirectories

channelDirectories: ChannelDirectoryClient

channelFiles

channelFiles: ChannelFileClient

channelGroups

channelGroups: ChannelGroupClient

channelMessages

channelMessages: ChannelMessageClient

channels

channels: ChannelClient

channelWebRtcs

channelWebRtcs: ChannelWebRtcClient

communities

communities: CommunityClient

communityMemberBans

communityMemberBans: CommunityMemberBanClient

communityMemberInvites

communityMemberInvites: CommunityMemberInviteClient

communityMemberRoles

communityMemberRoles: CommunityMemberRoleClient

communityMembers

communityMembers: CommunityMemberClient

communityRoles

communityRoles: CommunityRoleClient


dataStore

dataStore: object

This property groups together all your server-side persistence APIs. All the options store data on the server side except the logs. The messages you write to the logs will be available to community admins.

appData

appData: KeyValueStore

assets

assets: AssetClient

config

config: RootDatabaseConfig

logs

logs: object

logs.community

community: CommunityAppLogClient


globalSettings

globalSettings: GlobalSettings | undefined

Global settings


jobScheduler

jobScheduler: JobScheduler

A service for scheduling tasks that need to execute at future date(s). The job scheduler notifies you via an event when it's time for your job to run.


lifecycle

lifecycle: RootAppLifecycle

Lifecycle methods for your server-side component.


memberGroups

memberGroups: MemberGroupService

Member groups