1.0.6 • Published 1 year ago

egg-mysql-reconnection v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

egg-mysql-reconnection

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

Install

npm i egg-mysql-reconnection --save

Usage

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

Configuration

// {app_root}/config/config.default.js
exports.mysql = {
  // database configuration
  client: {
    // host
    host: 'mysql.com',
    // port
    port: '3306',
    // username
    user: 'test_user',
    // password
    password: 'test_password',
    // database
    database: 'test',
  },
  // load into app, default is open
  app: true,
  // 每隔几秒就在数据库查询一次,保持活性,单位毫秒
  interval: 2000
};

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

Example

Questions & Suggestions

Please open an issue here.

License

MIT

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.0

1 year ago