Skip to content
Snippets Groups Projects
Commit 2a1fdf0b authored by Aaron Dötsch's avatar Aaron Dötsch
Browse files

update

parent 1d147c37
No related branches found
No related tags found
No related merge requests found
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");
});
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;
import { sveltekit } from '@sveltejs/kit/vite'; import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import { staticFileServer } from './src/staticFileServer';
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [sveltekit()]
sveltekit(),
staticFileServer(),
],
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment