Compare commits

..

2 Commits

Author SHA1 Message Date
3189d4d274 1.0.23 2018-05-30 16:34:07 +02:00
c2d134a6ea fix(websocket): switch to all websocket infrastructure 2018-05-30 16:34:06 +02:00
3 changed files with 306 additions and 293 deletions

584
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartuniverse", "name": "@pushrocks/smartuniverse",
"version": "1.0.22", "version": "1.0.23",
"private": true, "private": true,
"description": "messaging service for your micro services", "description": "messaging service for your micro services",
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -79,6 +79,19 @@ export class Universe {
port: 12345 // fix this within smartsocket port: 12345 // fix this within smartsocket
}); });
const ClientRole = new plugins.smartsocket.SocketRole({
name: 'clientuniverse',
passwordHash: 'clientuniverse' // authentication happens on another level
});
this.smartsocket.addSocketRoles([ClientRole]);
const SubscriptionSocketFunction = new plugins.smartsocket.SocketFunction({
allowedRoles: [ClientRole],
funcName: 'channelSubscription',
funcDef: () => {}
});
this.smartsocket.setExternalServer('express', this.smartexpressServer as any); this.smartsocket.setExternalServer('express', this.smartexpressServer as any);
// should work with express as well // should work with express as well
this.smartsocket.start(); this.smartsocket.start();