Skip to content

Commit

Permalink
Use .ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
Glowstudent777 committed Jan 5, 2025
1 parent f7f13c5 commit b8bd209
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env.schema
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PORT=
API_PORT=
REDIS_URL=
7 changes: 6 additions & 1 deletion src/redis.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import Redis from "ioredis";

export const redis = new Redis(
"redis://default:SecurePassword@10.77.1.114:6379"
process.env.REDIS_URL ?? "redis://default:SecurePassword@localhost:6379",
{
tls: {
rejectUnauthorized: false,
},
}
);

export function connectRedis() {
Expand Down

0 comments on commit b8bd209

Please sign in to comment.