19 lines
351 B
JavaScript
19 lines
351 B
JavaScript
|
|
import redis from 'redis';
|
||
|
|
|
||
|
|
function createPublisher(redisURL: string): any {
|
||
|
|
return redis.createClient(redisURL, { no_ready_check: true });
|
||
|
|
}
|
||
|
|
|
||
|
|
function createSubscriber(redisURL: string): any {
|
||
|
|
return redis.createClient(redisURL, { no_ready_check: true });
|
||
|
|
}
|
||
|
|
|
||
|
|
let RedisPubSub = {
|
||
|
|
createPublisher,
|
||
|
|
createSubscriber
|
||
|
|
}
|
||
|
|
|
||
|
|
export {
|
||
|
|
RedisPubSub
|
||
|
|
}
|