Add Redis client configuration
This commit is contained in:
parent
e98532daaf
commit
ac837fb750
1 changed files with 8 additions and 0 deletions
8
src/routes/api/redis-client.ts
Normal file
8
src/routes/api/redis-client.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
import { Redis } from 'ioredis'
|
||||||
|
|
||||||
|
const redis = new Redis({
|
||||||
|
host: process.env.REDIS_HOST || 'localhost',
|
||||||
|
port: parseInt(process.env.REDIS_PORT || '6379')
|
||||||
|
})
|
||||||
|
|
||||||
|
export default redis
|
||||||
Loading…
Reference in a new issue