bloggify-mongoose
Support for Mongoose models in Bloggify.
☁️ Installation
# Using npm npm install --save bloggify-mongoose # Using yarn yarn add bloggify-mongoose
📋 Example
// Configuration examplemoduleexports = db: "mongodb://localhost/people" models_dir: "path/to/models" /* Comment.js: module.exports = { body: String, ... }; */ models: User: name: first: type: String required: true match: /.*\S+.*/ "Invalid name." last: type: String required: true match: /.*\S+.*/ "Invalid name." email: type: String index: true required: true match: /^\w+*@\w+*+$/ "Please fill a valid email address." ;
❓ Get Help
There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues. 🐛
📝 Documentation
Plugin Configuration
- Object
config
: uri
(String): The database url.models
(Object): An object containing the Mongoose models.models_dir
(String): The relative path to a directory containing models stored in files.
The model objects can be accessed by requiring the module or accessing the Bloggify.models
object.
😋 How to contribute
Have an idea? Found a bug? See how to contribute.
💫 Where is this library used?
If you are using this library in one of your projects, add it in this list. ✨
todos-app-bloggify-react