Skip to content

Commit

Permalink
bugfix(platform): execute callback passed into listen method nestjs#1820
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Mar 26, 2019
1 parent a6c0d19 commit 0a28c16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/platform-express/adapters/express-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export class ExpressAdapter extends AbstractHttpAdapter {

public listen(port: string | number, callback?: () => void);
public listen(port: string | number, hostname: string, callback?: () => void);
public listen(port: any, hostname?: any, callback?: any) {
return this.httpServer.listen(port, hostname, callback);
public listen(port: any, ...args: any[]) {
return this.httpServer.listen(port, ...args);
}

public close() {
Expand Down
4 changes: 2 additions & 2 deletions packages/platform-fastify/adapters/fastify-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export class FastifyAdapter extends AbstractHttpAdapter {

public listen(port: string | number, callback?: () => void);
public listen(port: string | number, hostname: string, callback?: () => void);
public listen(port: any, hostname?: any, callback?: any) {
return this.instance.listen(port, hostname, callback);
public listen(port: any, ...args: any[]) {
return this.instance.listen(port, ...args);
}

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

0 comments on commit 0a28c16

Please sign in to comment.