feat: a couple env variables more

This commit is contained in:
redglow
2026-06-21 19:44:33 +02:00
parent 7d973739da
commit 61196dc325
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ Compile:
Run: Run:
``` ```
NODE_ENV=production HTTP_PORT=1234 node ./src/server/main.ts NODE_ENV=production HTTP_PORT=1234 DATABASE_PATH=/opt/owof-announcements/data.db UPLOADS_DIR=/opt/owof-announcements/uploads node /opt/owof-announcements/code/src/server/main.ts
``` ```
Copy to server: Copy to server:
+1 -1
View File
@@ -3,7 +3,7 @@ import { Kysely, SqliteDialect } from "kysely";
import type { Database } from "./types.ts"; import type { Database } from "./types.ts";
const dialect = new SqliteDialect({ const dialect = new SqliteDialect({
database: new SQLite("./data.db"), database: new SQLite(process.env.DATABASE_PATH ?? "./data.db"),
}); });
export const db = new Kysely<Database>({ export const db = new Kysely<Database>({
+1 -1
View File
@@ -6,7 +6,7 @@ import ViteExpress from "vite-express";
import z from "zod"; import z from "zod";
import { db } from "./db/database.ts"; import { db } from "./db/database.ts";
const baseUploadsFolder = "uploads/"; const baseUploadsFolder = process.env.UPLOADS_DIR ?? "uploads/";
const upload = multer({ const upload = multer({
dest: baseUploadsFolder, dest: baseUploadsFolder,