Responses
Convenience functions for responses generated by this daemon in response to requests.
Usage
import {
response,
response302,
buildCookie
} from 'webdaemon'
Patterns
Return a response object from a handler function:
return response({
ok: 'Great work'
})
Return a 404 response from a handler function:
return response({
error: '404 Cannot find that thing you requested'a
})
Note that an integer at the start of an error attribute is used in the response status code.