Skip to content

Commit 21dd9ab

Browse files
committed
fix: config usages
1 parent 5de3494 commit 21dd9ab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"homepage": "https://cocreate.app/docs/CoCreate-socket-server",
4242
"dependencies": {
4343
"@cocreate/cli": "^1.33.8",
44+
"@cocreate/config": "^1.0.0",
4445
"@cocreate/uuid": "^1.4.26",
4546
"ws": "7.5.9"
4647
}

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ const WebSocket = require('ws');
22
const url = require("url");
33
const EventEmitter = require("events").EventEmitter;
44
const uid = require('@cocreate/uuid')
5-
const { config } = require('@cocreate/cli')
5+
const config = require('@cocreate/config')
66

77
class SocketServer extends EventEmitter {
88
constructor(server, prefix) {
99
super();
1010
this.clients = new Map();
1111
this.prefix = prefix || "crud";
12-
config({ key: 'organization_id', prompt: 'Enter your organization_id: ' })
12+
config({ organization_id: { prompt: 'Enter your organization_id: ' } })
1313

1414
this.wss = new WebSocket.Server({ noServer: true });
1515
this.wss.on('headers', (headers, request) => {

0 commit comments

Comments
 (0)