renaming to api-websocket-bridge

This commit is contained in:
2023-06-11 12:40:11 +00:00
parent 2f94733e2a
commit be5297bcfe
3 changed files with 7 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "websocket-driver",
"name": "api-websocket-bridge",
"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",
"scripts": {
"docker-build": "docker build -t websocket-driver ."

View File

@@ -1,16 +1,16 @@
const WebSocketDriver = require('./WebSocketDriver');
const WebSocketBridge = require('./bridge');
// Load the configuration from config.json
const config = require('/app/config/config.json');
// 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()
.then(() => {
driver.log('WebSocket driver is running', 'info');
driver.log('WebSocket Bridge is running', 'info');
})
.catch((error) => {
driver.log(`Failed to start WebSocket driver: ${error.message}`, 'error');
driver.log(`Failed to start WebSocket Bridge: ${error.message}`, 'error');
});