mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 06:04:05 +00:00
env vars naming
This commit is contained in:
@@ -2,12 +2,12 @@ import { createClient } from "redis";
|
||||
|
||||
import logger from "../utils/logger.ts";
|
||||
|
||||
if (!process.env["REDIS_URI"])
|
||||
if (!process.env["SPOTMGR_REDIS_URI"])
|
||||
throw new TypeError("Redis connection URI not defined");
|
||||
|
||||
// Initialize
|
||||
const redisClient: ReturnType<typeof createClient> = createClient({
|
||||
url: process.env["REDIS_URI"],
|
||||
url: process.env["SPOTMGR_REDIS_URI"],
|
||||
socket: {
|
||||
keepAlive: 25 * 1000, // 25s
|
||||
connectTimeout: 15 * 1000,
|
||||
|
||||
@@ -10,13 +10,13 @@ type ConnConfigs = Record<string, SeqOptsWithURI>;
|
||||
// env-specific config
|
||||
const connConfigs: ConnConfigs = {
|
||||
development: {
|
||||
use_env_variable: "DB_URI",
|
||||
use_env_variable: "SPOTMGR_DB_URI",
|
||||
},
|
||||
test: {
|
||||
use_env_variable: "DB_URI",
|
||||
use_env_variable: "SPOTMGR_DB_URI",
|
||||
},
|
||||
production: {
|
||||
use_env_variable: "DB_URI",
|
||||
use_env_variable: "SPOTMGR_DB_URI",
|
||||
// dialectOptions: {
|
||||
// ssl: true,
|
||||
// },
|
||||
|
||||
Reference in New Issue
Block a user