mirror of
https://github.com/litruv/API-WebSocket-Bridge.git
synced 2026-07-24 02:36:03 +10:00
renaming to api-websocket-bridge
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "websocket-driver",
|
"name": "api-websocket-bridge",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"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",
|
"description": "API WebSocket Bridge 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": "source/index.js",
|
"main": "source/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docker-build": "docker build -t websocket-driver ."
|
"docker-build": "docker build -t websocket-driver ."
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
const WebSocketDriver = require('./WebSocketDriver');
|
const WebSocketBridge = require('./bridge');
|
||||||
|
|
||||||
// Load the configuration from config.json
|
// Load the configuration from config.json
|
||||||
const config = require('/app/config/config.json');
|
const config = require('/app/config/config.json');
|
||||||
|
|
||||||
// Create an instance of WebSocketDriver
|
// Create an instance of WebSocketDriver
|
||||||
const driver = new WebSocketDriver(config);
|
const driver = new WebSocketBridge(config);
|
||||||
|
|
||||||
// Start the WebSocket driver
|
// Start the WebSocket Bridge
|
||||||
driver.start()
|
driver.start()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
driver.log('WebSocket driver is running', 'info');
|
driver.log('WebSocket Bridge is running', 'info');
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
driver.log(`Failed to start WebSocket driver: ${error.message}`, 'error');
|
driver.log(`Failed to start WebSocket Bridge: ${error.message}`, 'error');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user