Skip to content

Commit

Permalink
fix: config usages
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Jun 13, 2023
1 parent 5de3494 commit 21dd9ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"homepage": "https://cocreate.app/docs/CoCreate-socket-server",
"dependencies": {
"@cocreate/cli": "^1.33.8",
"@cocreate/config": "^1.0.0",
"@cocreate/uuid": "^1.4.26",
"ws": "7.5.9"
}
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ const WebSocket = require('ws');
const url = require("url");
const EventEmitter = require("events").EventEmitter;
const uid = require('@cocreate/uuid')
const { config } = require('@cocreate/cli')
const config = require('@cocreate/config')

class SocketServer extends EventEmitter {
constructor(server, prefix) {
super();
this.clients = new Map();
this.prefix = prefix || "crud";
config({ key: 'organization_id', prompt: 'Enter your organization_id: ' })
config({ organization_id: { prompt: 'Enter your organization_id: ' } })

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

0 comments on commit 21dd9ab

Please sign in to comment.