mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
Merge pull request #12761 from PieterScheffers/tcp-use-random-port
Be able to use a random port for the TCP server
This commit is contained in:
@@ -43,10 +43,10 @@ export class ServerTCP extends Server implements CustomTransportStrategy {
|
||||
|
||||
constructor(private readonly options: TcpOptions['options']) {
|
||||
super();
|
||||
this.port = this.getOptionsProp(options, 'port') || TCP_DEFAULT_PORT;
|
||||
this.host = this.getOptionsProp(options, 'host') || TCP_DEFAULT_HOST;
|
||||
this.port = this.getOptionsProp(options, 'port', TCP_DEFAULT_PORT);
|
||||
this.host = this.getOptionsProp(options, 'host', TCP_DEFAULT_HOST);
|
||||
this.socketClass =
|
||||
this.getOptionsProp(options, 'socketClass') || JsonSocket;
|
||||
this.getOptionsProp(options, 'socketClass', JsonSocket);
|
||||
this.tlsOptions = this.getOptionsProp(options, 'tlsOptions');
|
||||
|
||||
this.init();
|
||||
|
||||
Reference in New Issue
Block a user