Skip to content

nsc-open/egg-mysql-events

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published