pomelo-mysql-data-plugin

0.0.3 • Public • Published

pomelo-mysql-data-plugin

forked from pomelo-data-plugin

Config data plugin for Pomelo(a fast,scalable,distributed game server framework for Node.js. http://pomelo.netease.com), it can be used in Pomelo(>=0.7.0).

##Installation

npm install pomelo-mysql-data-plugin

##Usage

var dataPlugin = require('pomelo-mysql-data-plugin');
var mysqlConfig = {
  "dialect": "mysql",
  "host": "127.0.0.1",
  "port": "3306",
  "database": "test",
  "username": "test",
  "password": "test"
};
... ...
app.use(mysqlDataPlugin, {
    watcher: {
      idx: 'id',
      interval: 60000,
      dbConfig: mysqlConfig,
      tables: ['npc_config', 'task_config']
    }
  });
... ...
... ...
var npcConf = app.get('dataService').get('npc_config');
... ...
... ...

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i pomelo-mysql-data-plugin

    Weekly Downloads

    0

    Version

    0.0.3

    License

    none

    Unpacked Size

    6.31 kB

    Total Files

    8

    Last publish

    Collaborators

    • gaozhanyong