Skip to content

Commit

Permalink
fix(websockets): require @nestjs/platform-socket.io correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz committed Jan 21, 2021
1 parent b3e654e commit 7114f79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/websockets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"peerDependencies": {
"@nestjs/common": "^7.0.0",
"@nestjs/core": "^7.0.0",
"@nestjs/platform-socket.io": "^7.0.0",
"reflect-metadata": "^0.1.12",
"rxjs": "^6.0.0"
}
Expand Down
1 change: 1 addition & 0 deletions packages/websockets/socket-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class SocketModule<HttpServer = any> {
const { IoAdapter } = loadAdapter(
'@nestjs/platform-socket.io',
'WebSockets',
() => require('@nestjs/platform-socket.io'),
);
const ioAdapter = new IoAdapter(this.httpServer);
this.applicationConfig.setIoAdapter(ioAdapter);
Expand Down

0 comments on commit 7114f79

Please sign in to comment.