More attempts to fix docker
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { handler } from './build/handler.js';
|
||||
import { createServer } from 'http';
|
||||
import express from 'express';
|
||||
import { WebSocketServer } from 'ws';
|
||||
import * as net from 'net';
|
||||
import * as tls from 'tls';
|
||||
import { parse } from 'url';
|
||||
import http from 'http';
|
||||
import { handler } from './build/handler.js';
|
||||
|
||||
// Create an express app
|
||||
// Create Express app
|
||||
const app = express();
|
||||
|
||||
// Create HTTP server from Express
|
||||
const server = http.createServer(app);
|
||||
const server = createServer(app);
|
||||
|
||||
// Create WebSocket server
|
||||
const wss = new WebSocketServer({ noServer: true });
|
||||
@@ -18,8 +18,8 @@ const wss = new WebSocketServer({ noServer: true });
|
||||
// Active connections and their proxies
|
||||
const connections = new Map();
|
||||
|
||||
// Set up SvelteKit handler for all routes
|
||||
// This must be the last middleware before error handlers
|
||||
// Apply SvelteKit handler as middleware
|
||||
// This needs to be before any other routes
|
||||
app.use(handler);
|
||||
|
||||
// Handle WebSocket connections
|
||||
|
||||
Reference in New Issue
Block a user