Skip to content

Not Found Handler

You can set a custom code for not found routes using: <API>.setNotFoundHandler method.

/index.js
var api = new API(...);
api.setNotFoundHandler(`
$reply[
$setCode[404]
$setType[json]
$setBody[{ "msg": "route not found." }]
]
`);