code: public void stop() {
      if (httpHandler != null) {
        httpHandler.shutdown();
      }
      if (server != null) {
        ServerTools.print("Stopping server...");
        server.stop(5);
        isRunning = false;
        ServerTools.print("Server stopped");
      }
    }
docs: Stop the server. Once stopped, a server cannot be used again.