efcsydney/efcsydney-roster

View on GitHub
client/src/utils/pusher.js

Summary

Maintainability
A
0 mins
Test Coverage
import _ from 'lodash';
import Pusher from 'pusher-js';
import config from 'config/pusher.json';

const env = process.env.REACT_APP_ENV || process.env.NODE_ENV;
const key = _.get(config, `${env}.key`, null);
const cluster = _.get(config, `${env}.cluster`, null);

const pusher = new Pusher(key, {
  cluster,
  encrypted: true
});

export default pusher;