Backend integration
The Genvid web client needs to access a single service, called the leaf
,
which provides a websocket server from which the client will access the game
data. To get the connection URL for this service, two web requests must be sent
to the Disco service API:
The APIs use a secret code for security, so they should only be called from a
trusted website. In the Web Sample, we route them inside the
backend/streams.js
file to the /streams
and /channels/join
URLs,
respectively.
The disco service is registered with Consul and you can find its URL this way.
Commands, notifications, and events integration
The “webgateway” services expose three categories of endpoints:
/commands which let you send commands directly to the game,
/notifications which let you send notifications directly to the viewer, and
- /events which let you send a batch of events to the backend for processing
before sending it to the event pipeline, instead of directly sending them from the client.
These are powerful functionalities which we recommend you do not expose for public use.
See Webgateway service API for more information.