* Starts the HTTP / HTTPS server
()
| 168 | * Starts the HTTP / HTTPS server |
| 169 | */ |
| 170 | public async start() { |
| 171 | debug('Starting http server', this.serverOptions); |
| 172 | this.server.listen(this.serverOptions); |
| 173 | await once(this.server, 'listening'); |
| 174 | this._listening = true; |
| 175 | |
| 176 | const address = this.server.address(); |
| 177 | assert(address != null); |
| 178 | this._address = address!; |
| 179 | debug('Http server is listening on', this.url); |
| 180 | } |
| 181 | |
| 182 | /** |
| 183 | * Stops the HTTP / HTTPS server |