FBLA25/server.js
drake 585ae4924b
All checks were successful
ci / docker_image (push) Successful in 1m36s
ci / deploy (push) Successful in 16s
gitignore fix
2025-03-28 13:12:43 -05:00

19 lines
460 B
JavaScript

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');
});