File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 2828 "dependencies" : {
2929 "@cocreate/crud-client" : " ^1.10.0" ,
3030 "@cocreate/hosting" : " ^1.3.4" ,
31- "@cocreate/socket-client" : " ^1.5.6" ,
3231 "extract-comments" : " ^1.1.0" ,
3332 "glob" : " ^7.1.6" ,
3433 "parse-html-comments" : " ^1.3.1"
Original file line number Diff line number Diff line change 11const CoCreateCrud = require ( '@cocreate/crud-client' )
2- const CoCreateSocket = require ( '@cocreate/socket-client' )
32const mime = require ( 'mime-types' )
43
54const fs = require ( 'fs' ) ;
@@ -25,17 +24,15 @@ console.log(config)
2524process . env [ 'NODE_TLS_REJECT_UNAUTHORIZED' ] = 0
2625
2726/** init cocreatecrud and socket **/
28- let socket = new CoCreateSocket ( "ws" ) ;
29- CoCreateCrud . setSocket ( socket ) ;
30- socket . create ( {
31- namespace : socketConfig . organization_id ,
32- room : null ,
27+ CoCreateCrud . socket . create ( {
28+ organization_id : socketConfig . organization_id ,
29+ apiKey : socketConfig . apiKey ,
3330 host : socketConfig . host
3431} )
3532
3633const commonParam = {
37- apiKey : socketConfig . apiKey ,
38- organization_id : socketConfig . organization_id ,
34+ apiKey : socketConfig . apiKey ,
35+ organization_id : socketConfig . organization_id ,
3936 broadcast : false
4037}
4138
You can’t perform that action at this time.
0 commit comments