fix(core): update
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import * as plugins from './typedsocket.plugins';
|
||||
import type * as smartexpress from '@pushrocks/smartexpress';
|
||||
|
||||
const publicRoleName = 'publicRoleName';
|
||||
const publicRolePass = 'publicRolePass';
|
||||
@ -11,7 +12,7 @@ export class TypedSocket {
|
||||
*/
|
||||
public static async createServer(
|
||||
typedrouterArg: plugins.typedrequest.TypedRouter,
|
||||
smartexpressServerArg?: any
|
||||
smartexpressServerArg?: smartexpress.Server
|
||||
): Promise<TypedSocket> {
|
||||
const smartsocketServer = new plugins.smartsocket.Smartsocket({
|
||||
port: 3000,
|
||||
@ -58,7 +59,9 @@ export class TypedSocket {
|
||||
},
|
||||
smartsocketServer
|
||||
);
|
||||
|
||||
if (smartexpressServerArg && smartexpressServerArg.serverStatus !== 'running') {
|
||||
await smartexpressServerArg.start()
|
||||
}
|
||||
await smartsocketServer.start();
|
||||
|
||||
return typedsocket;
|
||||
|
Reference in New Issue
Block a user