add redis connection

This commit is contained in:
rafiarrafif
2025-05-08 23:46:31 +07:00
parent 6f14300347
commit 1f2030140b
3 changed files with 8 additions and 0 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -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"

View 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,
});