mirror of
https://github.com/karl0ss/orvibo-b25-server-kex.git
synced 2025-04-29 12:53:40 +01:00
update example file
This commit is contained in:
parent
c8e3ed76e7
commit
41cad85e85
@ -6,8 +6,8 @@ const httpPort = 3000;
|
|||||||
|
|
||||||
// Create a settings object to pass PK key and map sockets to names
|
// Create a settings object to pass PK key and map sockets to names
|
||||||
const settings = {
|
const settings = {
|
||||||
LOG_PACKET: false, //Show incoming packet data from the socket
|
LOG_PACKET: true, //Show incoming packet data from the socket
|
||||||
ORVIBO_KEY: '', // put your PK key here as plain text (See Readme)
|
ORVIBO_KEY: process.env.orviboPK, // put your PK key here as plain text (See Readme)
|
||||||
plugInfo : [
|
plugInfo : [
|
||||||
// Add uid and a name so you can easily identify the connected sockets
|
// Add uid and a name so you can easily identify the connected sockets
|
||||||
{
|
{
|
||||||
@ -16,9 +16,8 @@ const settings = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
console.log(settings.ORVIBO_KEY)
|
||||||
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;
|
||||||
orvibo.on('plugConnected', ({uid, name}) => {
|
orvibo.on('plugConnected', ({uid, name}) => {
|
||||||
console.log(`Connected ${uid} name = ${name}`);
|
console.log(`Connected ${uid} name = ${name}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user