From 2a1fdf0b898b74ae86f2177df1c5205660637ffe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aaron=20D=C3=B6tsch?= <aaron@fsmpi.rwth-aachen.de>
Date: Wed, 25 Sep 2024 10:31:16 +0200
Subject: [PATCH] update

---
 handler.js              | 10 ++++++++++
 src/staticFileServer.ts | 15 ---------------
 vite.config.ts          |  6 +-----
 3 files changed, 11 insertions(+), 20 deletions(-)
 create mode 100644 handler.js
 delete mode 100644 src/staticFileServer.ts

diff --git a/handler.js b/handler.js
new file mode 100644
index 0000000..56b8b96
--- /dev/null
+++ b/handler.js
@@ -0,0 +1,10 @@
+import { handler } from "./build/handler.js";
+import express from "express";
+
+const app = express();
+app.get("/static/*", express.static("static"));
+app.use(handler);
+
+app.listen(3000, () => {
+	console.log("Server started on http://localhost:3000");
+});
diff --git a/src/staticFileServer.ts b/src/staticFileServer.ts
deleted file mode 100644
index ac603eb..0000000
--- a/src/staticFileServer.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import express from "express";
-import type { Plugin } from "vite";
-
-const assets = express.static("static");
-
-const configureServer = (server=>{
-	server.middlewares.use(assets as any);
-	console.log(__dirname);
-}) as Plugin["configureServer"];
-
-export const staticFileServer = ()=>({
-	name: "StaticFileServer",
-	configureServer,
-	configurePreviewServer: configureServer,
-}) as Plugin;
diff --git a/vite.config.ts b/vite.config.ts
index 2082f9b..bbf8c7d 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,10 +1,6 @@
 import { sveltekit } from '@sveltejs/kit/vite';
 import { defineConfig } from 'vite';
-import { staticFileServer } from './src/staticFileServer';
 
 export default defineConfig({
-	plugins: [
-		sveltekit(),
-		staticFileServer(),
-	],
+	plugins: [sveltekit()]
 });
-- 
GitLab