import Redis from 'ioredis' ; const redisConfig = { port : 6179 , host : '' , prefix : 'sam:' , ttl : 60 * 60 * 23 , family : 4 , db : 0 , password : '' } ; param { String } prefix param { Number } ttl function createConnect ( prefix = 'com:' , ttl = 60 * 60 * 23 ) { return new Redis ( { ... redisConfig , prefix , ttl } ) ; } export default createConnect ;