🔧 This Hapi plugin generates API routes based on Mongoose schemas
!!! USE THIS IN COMBINATION WITH 'hapi-devine-mongodb' !!!
yarn add hapi-devine-api
Register it after hapi-devine-mongodb
server.register({
register: require(`hapi-devine-api`)
}, pluginHandler);
add api: true
to your schema exports, see hapi-devine-mongodb
const schema = {
// ...
}
module.export = {
schema,
api: true
}
MIT