Skip to content

Commit 708e36b

Browse files
Merge pull request nestjs#395 from pmitrifork/fix-allow-string-pipe-port
Allow providing server port as a string
2 parents 7357007 + 9ae0953 commit 708e36b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/common/interfaces/nest-application.interface.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export interface INestApplication extends INestApplicationContext {
4444
* @param {Function} callback Optional callback
4545
* @returns Promise
4646
*/
47-
listen(port: number, callback?: () => void): Promise<any>;
48-
listen(port: number, hostname: string, callback?: () => void): Promise<any>;
47+
listen(port: number | string, callback?: () => void): Promise<any>;
48+
listen(port: number | string, hostname: string, callback?: () => void): Promise<any>;
4949

5050
/**
5151
* Starts the application and can be awaited.
@@ -54,7 +54,7 @@ export interface INestApplication extends INestApplicationContext {
5454
* @param {string} hostname (optional)
5555
* @returns Promise
5656
*/
57-
listenAsync(port: number, hostname?: string): Promise<any>;
57+
listenAsync(port: number | string, hostname?: string): Promise<any>;
5858

5959
/**
6060
* Setups the prefix for the every HTTP route path

0 commit comments

Comments
 (0)