Scalable IoT solution for real-time body position data
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
419 B

const redis = require('redis');
const chalk = require('chalk');
const {redis_host, redis_port} = require('../config/keys')
const pub = redis.createClient(`redis://${redis_host}:${redis_port}`);
const sub = pub.duplicate();
pub.on('error', (error) => {
console.error(error);
});
pub.on('ready', () => {
pub.flush;
console.log(chalk.greenBright.bold('Connected to redis!'))
})
module.exports = {pub, sub}