remove environment from config.yml

This commit is contained in:
Milo Schwartz 2024-10-21 23:40:49 -04:00
parent d54cf34377
commit 1c4608fbf4
No known key found for this signature in database
4 changed files with 2 additions and 4 deletions

View file

@ -1,6 +1,5 @@
app:
name: Pangolin
environment: dev
base_url: http://localhost:3000
log_level: debug
save_logs: "false"

View file

@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"dev": "tsx watch server/index.ts",
"dev": "ENVIRONMENT=dev tsx watch server/index.ts",
"db:generate": "drizzle-kit generate",
"db:push": "npx tsx server/db/migrate.ts",
"db:hydrate": "npx tsx scripts/hydrate.ts",

View file

@ -9,7 +9,6 @@ export const APP_PATH = path.join("config");
const environmentSchema = z.object({
app: z.object({
name: z.string(),
environment: z.enum(["dev", "prod"]),
base_url: z.string().url(),
base_domain: z.string(),
log_level: z.enum(["debug", "info", "warn", "error"]),

View file

@ -16,7 +16,7 @@ import cookieParser from "cookie-parser";
import { User } from "@server/db/schema";
import { ensureActions } from "./db/ensureActions";
const dev = config.app.environment !== "prod";
const dev = process.env.ENVIRONMENT !== "prod";
const app = next({ dev });
const handle = app.getRequestHandler();