Moved db.js to shared code dir

This commit is contained in:
Kirill Fedoseev 2019-10-06 11:55:00 +03:00
parent b65785b320
commit 2aa1fea0c8
4 changed files with 2 additions and 22 deletions

View File

@ -9,6 +9,6 @@ COPY ./bncWatcher/package.json /watcher/
RUN npm install
COPY ./bncWatcher/bncWatcher.js ./bncWatcher/db.js /watcher/
COPY ./bncWatcher/bncWatcher.js ./shared/db.js /watcher/
ENTRYPOINT ["node", "bncWatcher.js"]

View File

@ -9,6 +9,6 @@ COPY ./ethWatcher/package.json /watcher/
RUN npm install
COPY ./ethWatcher/ethWatcher.js ./ethWatcher/db.js /watcher/
COPY ./ethWatcher/ethWatcher.js ./shared/db.js /watcher/
ENTRYPOINT ["node", "ethWatcher.js"]

View File

@ -1,20 +0,0 @@
const Redis = require('ioredis')
console.log('Connecting to redis')
const redis = new Redis({
port: 6379,
host: 'redis',
family: 4,
db: 0
})
redis.on('connect', () => {
console.log('Connected to redis')
})
redis.on('error', () => {
console.log('Redis error')
})
module.exports = redis