fastify-autocrud
Plugin for autogenerate CRUD routes as fast as possible.
Install
npm i fastify-autocrud --save
Usage
fastify
Product.js
const mongoose = const Product = name: String description: String image: String cost: Number price: Number qty: Number timestamps: true moduleexports = mongoose
If you want add custom routes
const customController = fastify
customController.js
const boom = const customRoute = method: 'GET' url: '/custom' { try replytype'application/json'code200 catch err throw boom } moduleexports = customRoute
License
Licensed under MIT.