revised readme, moved some stuff around

This commit is contained in:
2023-06-11 12:10:59 +00:00
parent 19c57ec156
commit a672409e4a
10 changed files with 610 additions and 45 deletions

View File

@@ -18,7 +18,6 @@ class WebSocketDriver {
* @type {Object}
*/
this.config = config;
this.config.events = require('./driverconfig.json').events;
this.wss = null;
this.eventEmitter = new EventEmitter();
this.intervalId = null;

View File

@@ -1,7 +0,0 @@
{
"certPath": "/etc/letsencrypt/live/salt.ruv.wtf/fullchain.pem",
"keyPath": "/etc/letsencrypt/live/salt.ruv.wtf/privkey.pem",
"port": 8080,
"updateInterval": 5000,
"apiUrl": "https://www.saltybet.com/state.json"
}

View File

@@ -1,24 +0,0 @@
{
"events": {
"teamNamesChange": {
"emitEvent": "teamNamesChange",
"params": ["p1name", "p2name"]
},
"betAmountChange": {
"emitEvent": "betAmountChange",
"params": ["p1total", "p2total"]
},
"statusChange": {
"emitEvent": "statusChange",
"params": ["status"]
},
"alertChange": {
"emitEvent": "alertChange",
"params": ["alert"]
},
"remainingChange": {
"emitEvent": "remainingChange",
"params": ["remaining"]
}
}
}

View File

@@ -1,7 +1,7 @@
const WebSocketDriver = require('./WebSocketDriver');
// Load the configuration from config.json
const config = require('./config.json');
const config = require('/app/config/config.json');
// Create an instance of WebSocketDriver
const driver = new WebSocketDriver(config);

View File

@@ -1,13 +1,13 @@
{
"name": "reporter",
"name": "websocket-driver",
"version": "1.0.0",
"description": "",
"description": "WebSocket Driver is a Node.js application that provides a WebSocket server for real-time communication. It allows clients to connect and exchange data using the WebSocket protocol",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"docker-build": "docker build -t websocket-driver ."
},
"author": "",
"license": "ISC",
"author": "Litruv",
"license": "Apache 2.0",
"dependencies": {
"axios": "^1.4.0",
"events": "^3.3.0",