add redis connection
This commit is contained in:
@ -13,6 +13,7 @@
|
|||||||
"bcrypt": "^5.1.1",
|
"bcrypt": "^5.1.1",
|
||||||
"cookie": "^1.0.2",
|
"cookie": "^1.0.2",
|
||||||
"elysia": "latest",
|
"elysia": "latest",
|
||||||
|
"ioredis": "^5.6.1",
|
||||||
"joi": "^17.13.3",
|
"joi": "^17.13.3",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"ua-parser-js": "^2.0.3"
|
"ua-parser-js": "^2.0.3"
|
||||||
|
|||||||
7
src/utils/databases/redis/connection.ts
Normal file
7
src/utils/databases/redis/connection.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import Redis from "ioredis";
|
||||||
|
|
||||||
|
export const redis = new Redis({
|
||||||
|
host: process.env.REDIS_HOST,
|
||||||
|
port: Number(process.env.REDIS_PORT),
|
||||||
|
password: process.env.REDIS_PASSWORD,
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user