add proxy server.

This commit is contained in:
Miroslav Šedivý 2024-03-17 11:20:33 +01:00
parent 27d88cee08
commit c8c7df7c3c

View File

@ -12,5 +12,15 @@ export default defineConfig({
alias: { alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)) '@': fileURLToPath(new URL('./src', import.meta.url))
} }
},
server: {
port: 3001,
proxy: process.env.NEKO_HOST ? {
'/api': {
target: 'http://' + process.env.NEKO_HOST + ':' + process.env.NEKO_PORT + '/',
changeOrigin: true,
ws: true
}
} : undefined
} }
}) })