Class Server
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Server(port, options)
|
Method Summary
| Method Attributes | Method Name and Description |
|---|---|
|
handleRequest(req, res)
Turns a Node request into a Capsela Request, hand it off to the pipeline
for servicing, then renders the resulting Response into the Node response.
|
|
|
isReady()
Returns a promise that's resolved when all stages are ready.
|
|
|
service(request)
|
|
|
start()
Starts the server once all stages are ready to go.
|
|
|
stop()
Stops the server.
|
- Methods borrowed from class Stage:
- addResolver
- addStage
- pass
- setNext
- setResolver
Class Detail
Server(port, options)
- Parameters:
- port
- options
- TLS-related options
Method Detail
-
handleRequest(req, res)Turns a Node request into a Capsela Request, hand it off to the pipeline for servicing, then renders the resulting Response into the Node response.
- Parameters:
- req
- res
-
isReady()Returns a promise that's resolved when all stages are ready.
- Returns:
- promise
-
service(request)
- Parameters:
- request
-
start()Starts the server once all stages are ready to go.
- Returns:
- promise
-
stop()Stops the server.
- Returns:
- promise