refactor: simplify db credential handling

This commit is contained in:
Dragory 2024-04-06 15:36:45 +00:00
parent 898cf18885
commit 1ef7ba8d0f
No known key found for this signature in database
6 changed files with 66 additions and 72 deletions

View file

@ -10,7 +10,7 @@ import { initGuildsAPI } from "./guilds/index";
import { clientError, error, notFound } from "./responses";
import { startBackgroundTasks } from "./tasks";
const apiPathPrefix = env.HOST_MODE === "lightweight" ? env.LIGHTWEIGHT_API_PATH_PREFIX || "" : "/api";
const apiPathPrefix = env.NODE_ENV === "production" ? env.API_PATH_PREFIX ?? "" : "/api";
const app = express();