HttpServer
Create a server that can respond to HTTP requests.
You write your server using The Elm Architecture by subscribing to request events and responding with commands in update.
Initialization
The permission to start a Server
.
You get this from initialize
.
The HTTP server.
Error code and message from node.
Most likely from a failed attempt to start the server (e.g. EADDRINUSE
).
Refer to the node docs for details.
Initialize the HttpServer
module and get permission to create a server.
Task to initialize a Server
.
Requests
An incoming HTTP reqest.
HTTP request methods.
String representation of method
Get request body as a string.
Get request body as json.
Get a string representation of the request.
Good for logging.
Responding to requests
Subscribe to incoming HTTP requests.
See HttpServer.Response for more details on responding to requests.