Deployment: Add Dockerfile and GitHub Actions CI/CD workflow

This commit is contained in:
Quintine committed 2026-05-20 13:56:43 +10:00
1 parent 71e6727a45
commit 68771a24ef
3 files changed
+74 -17

No files matched your search

+5 -1
View File
@@ -2,6 +2,7 @@ import express from 'express';
import cors from 'cors';
import { PrismaClient } from '@prisma/client';
import path from 'path';
import fs from 'fs';
const prisma = new PrismaClient();
const app = express();
@@ -186,7 +187,10 @@ app.post('/api/reset', async (req, res) => {
});
// Serve Static Files in Production
const frontendPath = path.join(__dirname, '../../frontend/dist');
const frontendPath = fs.existsSync(path.join(__dirname, '../frontend-dist'))
? path.join(__dirname, '../frontend-dist')
: path.join(__dirname, '../../frontend/dist');
app.use(express.static(frontendPath));
app.get(/^\/(?!api).*/, (req, res) => {