mirror of
https://github.com/litruv/API-WebSocket-Bridge.git
synced 2026-07-24 02:36:03 +10:00
revised readme, moved some stuff around
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
@@ -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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user