bigbluebutton-Github/labs/bbb-webrtc-sfu/server.js

30 lines
848 B
JavaScript
Raw Normal View History

2017-10-13 21:50:17 +08:00
/*
* Lucas Fialho Zawacki
* Paulo Renato Lanzarin
* (C) Copyright 2017 Bigbluebutton
*
*/
'use strict';
2017-10-13 21:50:17 +08:00
const ConnectionManager = require('./lib/connection-manager/ConnectionManager');
const HttpServer = require('./lib/connection-manager/HttpServer');
const server = new HttpServer();
const WebsocketConnectionManager = require('./lib/connection-manager/WebsocketConnectionManager');
const Logger = require('./lib/utils/Logger');
const ProcessManager = require('./lib/ProcessManager.js');
const PM = new ProcessManager();
2017-10-13 21:50:17 +08:00
PM.start();
const CM = new ConnectionManager(PM.screenshareProcess, PM.videoProcess);
let websocketManager = new WebsocketConnectionManager(server.getServerObject(), '/bbb-webrtc-sfu');
2017-10-13 21:50:17 +08:00
CM.setHttpServer(server);
CM.addAdapter(websocketManager);
CM.listen(() => {
Logger.info("[MainProcess] Server started");
});