externalManageALocalServer
Hierarchy
- Ability
- ManageALocalServer
Index
Constructors
Methods
Constructors
externalconstructor
Parameters
externalprotocol: SupportedProtocols
Protocol to be used when communicating with the running server;
http
orhttps
externalserver: Server
A Node.js server requestListener, with support for server shutdown.
Returns ManageALocalServer
Methods
staticexternalrunningAHttpListener
An
Ability
to manage a Node.js HTTP server using the providedrequestListener
.Parameters
externallistener: RequestListener | Server
Returns ManageALocalServer
staticexternalrunningAHttpsListener
An
Ability
to manage a Node.js HTTPS server using the provided serverrequestListener
.Parameters
externallistener: RequestListener | Server<typeof IncomingMessage, typeof ServerResponse>
externaloptions: ServerOptions<typeof IncomingMessage, typeof ServerResponse> = {}
Accepts an options object from
tls.createServer()
,tls.createSecureContext()
andhttp.createServer()
.
Returns ManageALocalServer
externallisten
Starts the server on the first free port between
preferredPort
andhighestPort
, inclusive.Parameters
externaloptionalpreferredPort: number = 8000
Lower bound of the preferred port range
externaloptionalhighestPort: number = 65535
highestPort Upper bound of the preferred port range
Returns Promise<void>
externalmapInstance
Provides access to the server
requestListener
Type parameters
- T
Parameters
externalfn: (server: ServerWithShutdown, protocol?: SupportedProtocols) => T
Returns T
An
Ability
that enables anActor
to manage a local Node.js server.Managing a raw Node.js server
Learn more