Merge pull request #5 from Dada1981/ai-changes

Changed folder structure
This commit is contained in:
Dada1981 2026-07-20 21:48:07 +02:00 committed by GitHub
commit 0b6955a6fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 4 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

View file

@ -28,6 +28,7 @@ const DATA_FILE = path.join(DATA_DIR, "database.json");
async function initDatabase(): Promise<AuthorData> { async function initDatabase(): Promise<AuthorData> {
try { try {
await fs.mkdir(DATA_DIR, { recursive: true }); await fs.mkdir(DATA_DIR, { recursive: true });
await fs.mkdir(path.join(DATA_DIR, "uploads"), { recursive: true });
try { try {
const existingData = await fs.readFile(DATA_FILE, "utf-8"); const existingData = await fs.readFile(DATA_FILE, "utf-8");
const parsed = JSON.parse(existingData) as AuthorData; const parsed = JSON.parse(existingData) as AuthorData;
@ -205,6 +206,9 @@ Die Synopsis soll neugierig machen, stark die visuelle Stimmung rüberbringen un
// Configure Vite middleware or static serve // Configure Vite middleware or static serve
async function startServer() { async function startServer() {
// Serve the dynamic uploads directory statically
app.use("/uploads", express.static(path.join(process.cwd(), "data", "uploads")));
if (process.env.NODE_ENV !== "production") { if (process.env.NODE_ENV !== "production") {
const { createServer: createViteServer } = await import("vite"); const { createServer: createViteServer } = await import("vite");
const vite = await createViteServer({ const vite = await createViteServer({