apeman-app-json
Version:
apeman app to serve dynamic json.
25 lines (22 loc) • 460 B
JavaScript
/** This is an example Apemanfile to use apeman-app-json */
module.exports = {
$pkg: { /* ... */ },
$apps: {
// Define your own app.
'my-app-01': {
// Map url and handlers.
'/': [
require('apeman-app-json')({
// Options
}),
(req, res, next) => {
// `res.json()` method is available now.
res.json({
success: true
})
}
]
}
}
}