Use this proxy server sample code to connect your Dolby.io communications API based project to our backend services and correctly handle POST requests for features such as starting and stopping RTMP or RTS streams. You can read our guide on webinars and virtual events to understand in more detail about RTMP and RTS based streams.
note This guide is written with Yarn in mind.
These instructions are all performed inside the
api-proxy
directory. As a pre-requesite, open up a terminal window in theapi-proxy
directory.
- Run the following command to install all necessary dependencies:
yarn
- Rename the api-proxy/.env.example file to
api-proxy/.env
, then add yourKEY
andSECRET
.
You can obtain your app key and secret to run this app from the Dolby.io dashboard. Follow the steps to obtain them.
-
Go to the Dashboard, and click on the
API Keys
next to your application. -
On the next screen, copy the
App key
andApp secret
and paste them in your.env
file against the marked variables. -
You can start the proxy server by running the following command.
yarn dev
- Observe the traffic on your terminal window, looking for the line
[1] Listening at http://localhost:4000/
You will still need to start your application (port 3000 by default) that will communicate with this API proxy service.
- You can now head back to the events app ReadMe file to continue building and running the app.