Merge pull request #5 from karl0ss/Docker

Docker
This commit is contained in:
Karl Hudgell 2019-07-14 16:12:57 +01:00 committed by GitHub
commit 1d7112eb9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,9 +22,9 @@ const createArray = str => {
const settings = {
LOG_PACKET: true, //Show incoming packet data from the socket
ORVIBO_KEY: process.env.orviboPK,
plugInfo : [
plugInfo :
createArray(process.env.plugArray)
],
,
};
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;
@ -70,9 +70,7 @@ const requestHandler = (request, response) => {
}
// Get all currently connected sockets, their names and states
// let sockets = orvibo.getConnectedSocket();
let sockets = [{"name":"3D Printer","state":1,"uid":"5ccf7f22fba4","modelId":"f8b11bed724647e98bd07a66dca6d5b6"}]
let sockets = orvibo.getConnectedSocket();
response.end(JSON.stringify(sockets));
};