feat: split start and listen
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
ac73c52395
commit
831a47fbf3
@ -122,10 +122,13 @@ export class CcServerBoot {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public start(port: number = 80) {
|
public start() {
|
||||||
const routeInfo = getRouteInfo(this._container);
|
console.log(prettyjson.render({ routes: { http: getRouteInfo(this._container), websocket: getNamespaceInfo() } }));
|
||||||
console.log(prettyjson.render({ routes: routeInfo }));
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public listen(port: number = 80) {
|
||||||
this._server.listen(port);
|
this._server.listen(port);
|
||||||
console.log(`Server started on port ${port} :)`);
|
console.log(`Server listen on port ${port} :)`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user