diff --git a/index.js b/index.js index 16ff587..51845f5 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ const fs = require('fs'); const path = require('path'); const defaultConfig = require('./config.json'); -const DbAsync = require('./db-async'); +const MyCDC = require('./mycdc'); const config = Object.assign({}, defaultConfig); const localPath = path.join(__dirname, 'config.local.json'); @@ -11,16 +11,16 @@ if (fs.existsSync(localPath)) { Object.assign(config, localConfig); } -let dbAsync; +let mycdc; async function main() { - dbAsync = new DbAsync(config) - await dbAsync.start(); + mycdc = new MyCDC(config) + await mycdc.start(); process.on('SIGINT', async function() { console.log('Got SIGINT.'); try { - await dbAsync.stop(); + await mycdc.stop(); } catch (err) { console.error(err); } diff --git a/db-async.js b/mycdc.js similarity index 99% rename from db-async.js rename to mycdc.js index 58918ba..b1ff721 100644 --- a/db-async.js +++ b/mycdc.js @@ -9,7 +9,7 @@ const allEvents = new Set([ 'deleterows' ]); -module.exports = class DbAsync { +module.exports = class MyCDC { constructor(config) { this.config = config; this.running = false;