initial commit

This commit is contained in:
Zoe
2025-09-02 22:12:07 -05:00
commit a89754f070
25 changed files with 1243 additions and 0 deletions

19
server.ts Normal file
View File

@@ -0,0 +1,19 @@
import { handler } from './build/handler.js'; // Adjust path as needed
import http from 'http';
import { WebSocketServer } from 'ws';
import polka from 'polka';
import { confgiureWebsocketServer } from './server/websocketHandler.ts'
const server = http.createServer();
const app = polka({ server });
const port = process.env.PORT || 4173;
const ws = new WebSocketServer({ server });
confgiureWebsocketServer(ws);
app.use(handler); // SvelteKit handler
app.listen(port, () => {
console.log(`Server listening on port ${port}`);
});