1.1.0 • Published 5 years ago

@dtheetla/mongoose_crud_helper v1.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

@dtheetla/mongoose_crud_helper

mongoose_crud_helper provides generic crud functions based on mongoose for express apps

Installation

Add this line to your application's Gemfile:

npm install '@dtheetla/mongoose_crud_helper'

Usage

const MongooseCrudHelper = require('@dtheetla/mongoose_crud_helper');
const modelsPath = path.join(__dirname, '../models/department.js')

const DeptCrudHelper = new MongooseCrudHelper('department');
DeptCrudHelper.create(req.body, (status, resp) => {
  res.status(status).json(resp);
});

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dtheetla/mongoose_crud_helper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The npm is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the mongoose_crud_helper project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.