<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->


















# bloggify-sequelize

 [![Version](https://img.shields.io/npm/v/bloggify-sequelize.svg)](https://www.npmjs.com/package/bloggify-sequelize) [![Downloads](https://img.shields.io/npm/dt/bloggify-sequelize.svg)](https://www.npmjs.com/package/bloggify-sequelize)







> Use Sequelize in Bloggify applications.

















## :cloud: Installation

```sh
# Using npm
npm install --save bloggify-sequelize

# Using yarn
yarn add bloggify-sequelize
```






















## :memo: Documentation


### Plugin Configuration

- **Object** `config`:
   - `uri` (String): The database uri (if this is used, the other config fields will be ignored).
   - `db_name` (String): The database name
   - `username` (Object): The database username.
   - `password` (Object): The database password.
   - `options` (Object): The database options.
   - `models_dir` (String): The relative path to a directory containing models stored in files.
   - `autosync` (Boolean): Wheter to autosync the database (default: true).

The model objects can be accessed by requiring the module or accessing the `Bloggify.models` object.

After the module is initialized, the `db` field is appended to the Sequelize module, being the Sequelize instance.
You can access the Sequelize instance using:

```js
const seq = require("sequelize").db
```









## :question: Get Help

There are few ways to get help:



 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). 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:














## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].
























## :scroll: License

[MIT][license] © [Bloggify][website]






[license]: /LICENSE
[website]: https://bloggify.org
[contributing]: /CONTRIBUTING.md
[docs]: /DOCUMENTATION.md
