🔧 chore: Configure Vite server with proxy settings

- Add `server` configuration in `vite.config.ts`
- Enable `host: 0.0.0.0` for external access
- Setup proxy for `/api`, `/mj`, and `/pg` endpoints targeting `http://localhost:3000`
This commit is contained in:
t0ng7u
2025-09-26 00:28:09 +08:00
parent dd46322421
commit 836ae7affe

View File

@@ -19,4 +19,21 @@ export default defineConfig({
'@': path.resolve(__dirname, './src'),
},
},
server: {
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
},
'/mj': {
target: 'http://localhost:3000',
changeOrigin: true,
},
'/pg': {
target: 'http://localhost:3000',
changeOrigin: true,
},
},
},
})