feat: always use DB_* and API_PATH_PREFIX env vars if set

This commit is contained in:
Dragory 2024-04-07 09:10:02 +00:00
parent e146ed6416
commit ae03c9e03b
No known key found for this signature in database
2 changed files with 6 additions and 21 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.NODE_ENV === "production" ? env.API_PATH_PREFIX ?? "" : "/api";
const apiPathPrefix = env.API_PATH_PREFIX || (env.NODE_ENV === "development" ? "/api" : "");
const app = express();