@cryb/portal - VM instance
@cryb/portal
is the instance deployed onto VM machines to act as the 'Virtual browser'.
@cryb/portal
connect to @cryb/portals
over WS to send and recieve updates like controller events and health updates.
@cryb/portal
has been actively developed internally since September 2019, and is now open source as of October 2019.
The codebase for @cryb/portal
is written in JavaScript, utilising TypeScript and Node.js.
We ask that you follow our code style guidelines when contributing to this repository.
We use TSLint in order to lint our code. Run yarn lint
before committing any code to ensure it's clean.
Note: while we have most rules covered in our tslint.json
config, it's good practice to familarise yourself with our code style guidelines
cryb/portal/
└──┐ src # The core source code
├── browser # Class used to start services on the VM, such as Chromium and ffmpeg
├── clients # Our Express.js setup and WebSocket setup
├── config # Services such as queue management, etc
└── utils # Helper methods
First, clone the @cryb/portal
repository locally:
git clone https://github.com/crybapp/portal.git
The following services need to be installed for @cryb/portal
to function:
@cryb/portals
@cryb/aperture
or Janus WebRTC Server
We recommend that you run the following services alongside @cryb/portal
, but it's not required.
@cryb/api
@cryb/web
@cryb/aperture
or Janus WebRTC Server
You also need to install the required dependencies by running yarn
Ensure that .env.example
is either copied and renamed to .env
, or is simply renamed to .env
.
In this file, you'll need some values. Documentation is available in the .env.example
file.
Make sure @cryb/portals
is running on port 5000 and that you have setup @cryb/aperture
or Janus WebRTC Server.
We recommend that you use a service like Docker to start an instance of @cryb/portal
.
To run @cryb/portal
in development mode on Docker, run yarn docker:dev
.
Use yarn docker:build
to build an image for deployment in production.
If you have an issues with @cryb/portal
, please either open a GitHub issue, contact a maintainer or join the Cryb Discord Server and ask in #tech-support
.