Run configure before ws connect to catch early console output
This commit is contained in:
parent
0822e06f17
commit
9d7ec3adcb
3
index.js
3
index.js
@ -54,8 +54,9 @@ const termlog = (options = {}) => {
|
|||||||
|
|
||||||
const ws = new WebSocket(`${options.ssl ? "wss" : "ws"}://${options.host}:${options.port}`);
|
const ws = new WebSocket(`${options.ssl ? "wss" : "ws"}://${options.host}:${options.port}`);
|
||||||
|
|
||||||
|
configure(ws, defaultConsole);
|
||||||
|
|
||||||
ws.onopen = () => {
|
ws.onopen = () => {
|
||||||
configure(ws, defaultConsole);
|
|
||||||
console.log('[TERMLOG]: Connected');
|
console.log('[TERMLOG]: Connected');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user