diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 9a075b2..c481c89 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -122,10 +122,13 @@ export class CcServerBoot { return this; } - public start(port: number = 80) { - const routeInfo = getRouteInfo(this._container); - console.log(prettyjson.render({ routes: routeInfo })); + public start() { + console.log(prettyjson.render({ routes: { http: getRouteInfo(this._container), websocket: getNamespaceInfo() } })); + return this; + } + + public listen(port: number = 80) { this._server.listen(port); - console.log(`Server started on port ${port} :)`); + console.log(`Server listen on port ${port} :)`); } }