better server build

This commit is contained in:
Drake Marino 2026-01-24 20:54:17 -06:00
parent 5349d60a3c
commit be7b71fce4
3 changed files with 795 additions and 3 deletions

778
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,9 @@
},
"dependencies": {
"bcrypt": "^6.0.0",
"desm": "^1.3.1",
"dotenv": "^17.2.3",
"express": "^5.2.1",
"jsonwebtoken": "^9.0.3",
"postgres": "^3.4.7",
"svelte-preprocess": "^6.0.3"

18
server.js Normal file
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');
});