better server build

This commit is contained in:
2026-01-24 20:54:17 -06:00
parent 5349d60a3c
commit be7b71fce4
3 changed files with 795 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
import express from 'express';
import { handler } from './build/handler.js';
import { join } from 'desm';
const assetsPath = join(import.meta.url, 'uploads');
const app = express();
// Serve static files dynamically from the "static" folder (e.g., for uploads)
app.use('/uploads', express.static(assetsPath));
// Serve the built SvelteKit app
app.use(handler);
// Start the server
app.listen(8080, () => {
console.log('Server running on port 8080');
});