mirror of
https://github.com/karl0ss/orvibo-b25-server-kex.git
synced 2025-04-29 12:53:40 +01:00
commit
1d7112eb9c
@ -22,9 +22,9 @@ const createArray = str => {
|
|||||||
const settings = {
|
const settings = {
|
||||||
LOG_PACKET: true, //Show incoming packet data from the socket
|
LOG_PACKET: true, //Show incoming packet data from the socket
|
||||||
ORVIBO_KEY: process.env.orviboPK,
|
ORVIBO_KEY: process.env.orviboPK,
|
||||||
plugInfo : [
|
plugInfo :
|
||||||
createArray(process.env.plugArray)
|
createArray(process.env.plugArray)
|
||||||
],
|
,
|
||||||
};
|
};
|
||||||
let orvibo = new Orvibo(settings);
|
let orvibo = new Orvibo(settings);
|
||||||
// When a socket first connects and initiates the handshake it will emit the connected event with the uid of the socket;
|
// When a socket first connects and initiates the handshake it will emit the connected event with the uid of the socket;
|
||||||
@ -70,9 +70,7 @@ const requestHandler = (request, response) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get all currently connected sockets, their names and states
|
// Get all currently connected sockets, their names and states
|
||||||
// let sockets = orvibo.getConnectedSocket();
|
let sockets = orvibo.getConnectedSocket();
|
||||||
let sockets = [{"name":"3D Printer","state":1,"uid":"5ccf7f22fba4","modelId":"f8b11bed724647e98bd07a66dca6d5b6"}]
|
|
||||||
|
|
||||||
response.end(JSON.stringify(sockets));
|
response.end(JSON.stringify(sockets));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user