2.1.1 • Published 4 years ago

bloggify-mongoose v2.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

bloggify-mongoose

Version Downloads

Support for Mongoose models in Bloggify.

:cloud: Installation

# Using npm
npm install --save bloggify-mongoose

# Using yarn
yarn add bloggify-mongoose

:clipboard: Example

// Configuration example
module.exports = {
    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+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/, "Please fill a valid email address."]
            }
        }
    }
};

:question: Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. :bug:

:memo: 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.

:yum: How to contribute

Have an idea? Found a bug? See how to contribute.

:dizzy: Where is this library used?

If you are using this library in one of your projects, add it in this list. :sparkles:

  • todos-app-bloggify-react

:scroll: License

MIT © Bloggify

2.1.1

4 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago