send
A basic response function for sending basic html/text content back to the caller
const { response } = require('octoris')
Arguments
Usage
const { response } = require('octoris')
// Since responses are curried we can create a basic status code constant
const OK = response.send(200)
function homeHandler (ctx) {
return OK('Hello Home!')
}
function aboutHandler (ctx) {
return response.send(201, 'New Status with about!')
}
Last updated
Was this helpful?