Skip to content

Commit 0a28c16

Browse files
bugfix(platform): execute callback passed into listen method nestjs#1820
1 parent a6c0d19 commit 0a28c16

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/platform-express/adapters/express-adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export class ExpressAdapter extends AbstractHttpAdapter {
4444

4545
public listen(port: string | number, callback?: () => void);
4646
public listen(port: string | number, hostname: string, callback?: () => void);
47-
public listen(port: any, hostname?: any, callback?: any) {
48-
return this.httpServer.listen(port, hostname, callback);
47+
public listen(port: any, ...args: any[]) {
48+
return this.httpServer.listen(port, ...args);
4949
}
5050

5151
public close() {

packages/platform-fastify/adapters/fastify-adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export class FastifyAdapter extends AbstractHttpAdapter {
2525

2626
public listen(port: string | number, callback?: () => void);
2727
public listen(port: string | number, hostname: string, callback?: () => void);
28-
public listen(port: any, hostname?: any, callback?: any) {
29-
return this.instance.listen(port, hostname, callback);
28+
public listen(port: any, ...args: any[]) {
29+
return this.instance.listen(port, ...args);
3030
}
3131

3232
public reply(response: any, body: any, statusCode: number) {

0 commit comments

Comments
 (0)