Expand description
The Essential Node HTTP API.
Find the available endpoints under the endpoint
module.
To serve the node API, construct a router
, a TcpListener
and call serve
.
Modules§
- Provides a small module for each endpoint with associated
PATH
andhandler
.
Structs§
- An error occurred while attempting to serve a connection.
- State provided to the endpoints when serving connections.
Enums§
- An error occurred while attempting to serve a new connection.
Constants§
- The default value used by
essential-node-cli
for the maximum number of TCP stream connections to maintain at once.
Functions§
- The default CORS layer.
- Accept and return the next TCP stream connection.
- Construct the endpoint router with the node
endpoint
s, CORS layer and DB connection pool as state. - Continuously serve the Node API using the given
router
and TCPlistener
. - Serve a newly accepted TCP stream.
- Accept and serve the next connection.
- Add the node API
endpoint
s to the givenrouter
.