Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
LINAGORA
L
LGS
Labs
hublot
Commits
51696e42
Commit
51696e42
authored
Oct 26, 2017
by
Tom Jorquera
Browse files
refactor client creation into its own function
This will allows to easily create multiple clients later.
parent
7a2c2ea7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
app.js
app.js
+9
-3
No files found.
app.js
View file @
51696e42
...
...
@@ -30,10 +30,16 @@ console.log('starting hublot...');
controller
.
loadAll
(
'
controller
'
,
'
lib
'
,
'
robot
'
)
.
then
(
modules
=>
{
console
.
log
(
'
modules loaded... launching runner
'
);
// Note: client returned object can be used to control further the browser
// e.g.: let c = client('room'); c.end();
const
client
=
room
=>
runner
.
run
(
modules
,
config
.
visio
.
url
,
room
,
config
.
client
);
const
room
=
'
test-bot
'
;
// Note: client can be used to control further the browser
// e.g.: let client = runner.run(...); client.end();
registry
[
room
]
=
runner
.
run
(
modules
,
config
.
visio
.
url
,
room
,
config
.
client
);
registry
[
room
]
=
client
(
room
);
})
.
catch
(
err
=>
{
console
.
error
(
err
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment