egg-mysql-events

0.0.4 • Public • Published

egg-mysql-events

NPM version build status Test coverage David deps Known Vulnerabilities npm download

This is an egg plugin based on https://www.npmjs.com/package/@rodrigogs/mysql-events

Install

$ npm i egg-mysql-events --save

Usage

// {app_root}/config/plugin.js
exports.mysqlEvents = {
  enable: true,
  package: 'egg-mysql-events',
};

Configuration

// {app_root}/config/config.default.js
exports.mysqlEvents = config.mysqlEvents = [{
  connection: {
    host: '127.0.0.1',
    port: 3306,
    user: 'mysql-user',
    password: 'password'
  },
  triggers: [{
    name: 'TEST',
    expression: 'db.t_projects',
    onEvent: ({ event, app }) => console.log(event, app)
  }]
}]

see config/config.default.js for more detail.

Example

Questions & Suggestions

Please open an issue here.

License

MIT

Package Sidebar

Install

npm i egg-mysql-events

Weekly Downloads

6

Version

0.0.4

License

MIT

Unpacked Size

7.96 kB

Total Files

7

Last publish

Collaborators

  • ygjack