A bunch of shit

This commit is contained in:
MotorTruck1221
2025-03-17 23:32:14 -06:00
parent 6b09a5350e
commit 19e6beaec4
12 changed files with 1042 additions and 27 deletions
+28 -1
View File
@@ -1,3 +1,30 @@
import { defineConfig } from 'astro/config';
import type { Plugin } from 'vite';
import wisp from "wisp-server-node";
import node from '@astrojs/node';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({});
const viteWispServer = (): Plugin => {
return {
name: 'vite-wisp-server',
configureServer(server) {
server.httpServer?.on('upgrade', (req, socket, head) => {
console.log('3');
req.url.startsWith('/wisp') ? wisp.routeRequest(req, socket, head) : undefined
})
}
}
};
export default defineConfig({
vite: {
plugins: [
tailwindcss(),
viteWispServer()
]
},
output: 'server',
adapter: node({
mode: 'middleware'
})
});