* Stops the server * @returns {Tenso} The Tenso instance for method chaining
()
| 396 | * @returns {Tenso} The Tenso instance for method chaining |
| 397 | */ |
| 398 | stop () { |
| 399 | if (this.server !== null) { |
| 400 | this.server.close(); |
| 401 | this.server = null; |
| 402 | this.log(`Stopped server on ${this.host}:${this.port}`); |
| 403 | } |
| 404 | |
| 405 | return this; |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | /** |
no test coverage detected