(address: any)
| 354 | } |
| 355 | |
| 356 | private formatAddress(address: any): string { |
| 357 | if (isString(address)) { |
| 358 | if (platform() === 'win32') { |
| 359 | return address; |
| 360 | } |
| 361 | const basePath = encodeURIComponent(address); |
| 362 | return `${this.getProtocol()}+unix://${basePath}`; |
| 363 | } |
| 364 | |
| 365 | let host = this.host(); |
| 366 | if (address && address.family === 'IPv6') { |
| 367 | if (host === '::') { |
| 368 | host = '[::1]'; |
| 369 | } else { |
| 370 | host = `[${host}]`; |
| 371 | } |
| 372 | } else if (host === '0.0.0.0') { |
| 373 | host = '127.0.0.1'; |
| 374 | } |
| 375 | |
| 376 | return `${this.getProtocol()}://${host}:${address.port}`; |
| 377 | } |
| 378 | |
| 379 | public setGlobalPrefix(prefix: string, options?: GlobalPrefixOptions): this { |
| 380 | this.config.setGlobalPrefix(prefix); |
no test coverage detected