Skip to content

Commit e6c83cb

Browse files
changed socket port to application port on connect
1 parent c314fb1 commit e6c83cb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codebolt/codeboltjs",
3-
"version": "1.1.61",
3+
"version": "1.1.62",
44
"description": "",
55
"keywords": [],
66
"author": "",
@@ -28,7 +28,7 @@
2828
"devDependencies": {
2929
"@types/events": "^3.0.3",
3030
"@types/js-yaml": "^4.0.9",
31-
"@types/node": "^20.14.2",
31+
"@types/node": "^20.16.5",
3232
"@types/ws": "^8.5.10",
3333
"jest": "^29.7.0",
3434
"jest-serial-runner": "^1.2.1",

src/modules/websocket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class cbws {
1515
const uniqueConnectionId = this.getUniqueConnectionId();
1616
const initialMessage = this.getInitialMessage();
1717
console.log(uniqueConnectionId)
18-
this.websocket = new WebSocket(`ws://localhost:12345/codebolt?id=${uniqueConnectionId}`);
18+
this.websocket = new WebSocket(`ws://localhost:${process.env.SOCKET_PORT}/codebolt?id=${uniqueConnectionId}`);
1919
this.initializeWebSocket(initialMessage).catch(error => {
2020
console.error("WebSocket connection failed:", error);
2121
});

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
3333
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
3434
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35-
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
35+
"types": ["node"], /* Specify type package names to be included without being referenced in a source file. */
3636
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
3737
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
3838
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */

0 commit comments

Comments
 (0)