Commit 7a2c2ea7 authored by Tom Jorquera's avatar Tom Jorquera

Store the room and client in memory

First step to handle multiple, non-conflicting clients connecting to different
rooms.
parent 7ea82e13
......@@ -23,14 +23,17 @@ const config = require('./config.json');
const runner = require('./lib/runner.js')(config.runner);
const controller = require('./lib/controller.js')('./client');
const registry = {};
console.log('starting hublot...');
controller.loadAll('controller', 'lib', 'robot')
.then(modules => {
console.log('modules loaded... launching runner');
// Note: result can be stored in a variable to control further the browser
const room = 'test-bot';
// Note: client can be used to control further the browser
// e.g.: let client = runner.run(...); client.end();
runner.run(modules, config.visio.url, 'test-bot', config.client);
registry[room] = runner.run(modules, config.visio.url, room, config.client);
})
.catch(err => {
console.error(err);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment