Constructs a new Application instance. Drive it by calling HttpServer.pump repeatedly.
The network address the server will bind to.
The port number the server will listen on.
Optionaloptions: HttpServerOptions
Limits, deadlines, per-pump budgets and the clock of the underlying HttpServer.
ProtectederrorProtected ReadonlyhandlerThe request handler to be used when serving requests
ProtectedloggerProtectedrequestProtectedserverThe underlying TCP server.
Legacy entry point, kept for compatibility: it runs one pump.
Unlike earlier versions it neither handles exactly one client nor finishes a request within the call: a call may accept several clients and advance several connections, and a request may take several calls to be read and answered. Keep calling it repeatedly, as before.
Use pump.
Closes the listening socket and every open connection and releases their buffers. Safe to call more than once; later calls, and later pumps, do nothing.
The number of open connections. (A method rather than a getter: accessors would slow every property access on the server and its subclasses in the generated Lua.)
Registers a DELETE request handler.
Registers a GET request handler.
Registers an OPTIONS request handler.
Registers a PATCH request handler.
Registers a POST request handler.
Does a bounded amount of work and returns: accepts up to maxAcceptsPerPump new connections (while fewer
than maxConnections are open), then visits open connections round-robin within the per-pump budgets.
Call it repeatedly, for example from a timer callback; it never waits for a socket.
What this pump did. Cheap to ignore; useful for instrumentation.
Registers a PUT request handler.
Registers a request handler for all HTTP methods on a specific route.
The route pattern to match.
The handler function to execute.
A class representing a web application, extending the functionality of HttpServer.