stop() {
    return new Promise((resolve, reject) => {
      if (!this.server.listening) {
        resolve();
        return;
      }

      this.server.removeAllListeners();

      this.server.close(err => {
        if (err) {
          reject(err);
          return;
        }

        this.debug('Server successfully closed.');
        resolve();
      });
    });
  }
Closes the server

@returns {Promise<void>}