mirror of
https://github.com/nttgin/BGPalerter.git
synced 2024-05-19 06:50:08 +00:00
refactoring, introduced dependency injector
This commit is contained in:
8
index.js
8
index.js
@@ -1,12 +1,8 @@
|
||||
import config from "./config";
|
||||
import { config, logger } from "./env";
|
||||
import cluster from "cluster";
|
||||
import WebSocket from "ws";
|
||||
import sleep from "sleep";
|
||||
import Consumer from "./consumer";
|
||||
import InputManager from "./inputManager";
|
||||
import logger from './logger';
|
||||
|
||||
const inputManager = new InputManager(config);
|
||||
|
||||
if (cluster.isMaster) {
|
||||
|
||||
@@ -65,5 +61,5 @@ if (cluster.isMaster) {
|
||||
}
|
||||
|
||||
} else {
|
||||
new Consumer(inputManager)
|
||||
new Consumer();
|
||||
}
|
||||
|
Reference in New Issue
Block a user