mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 23:49:59 -07:00
31 lines
1019 B
TypeScript
31 lines
1019 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
export default defineConfig({
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
configure: (proxy, _options) => {
|
|
proxy.on('error', (err, _req, _res) => {
|
|
console.log('proxy err:', err);
|
|
});
|
|
proxy.on('proxyReq', (proxyReq, req, _res) => {
|
|
console.log('Sending Request to the Target:', req.method, req.url);
|
|
});
|
|
proxy.on('proxyRes', (proxyRes, req, _res) => {
|
|
console.log('Received Response from the Target:', proxyRes.statusCode, req.url);
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [sveltekit()],
|
|
|
|
test: {
|
|
include: ['src/**/*.{test,spec}.{js,ts}']
|
|
}
|
|
});
|