feat: add Vite proxy, change terminal to other channel

This commit is contained in:
wancat committed 2023-08-21 20:40:05 +08:00
1 parent c3e735b627
commit c248004484
5 files changed
+11 -8

No files matched your search

+6 -2
View File
@@ -7,8 +7,12 @@ export default defineConfig({
server: {
proxy: {
'/api': {
// target: 'http://localhost:3000', // the server url
target: 'http://odyssey.wancat.cc ',
target: 'http://localhost:3000/api/v1',
rewrite: (path) => path.replace(/^\/api/, ''), // Optional: remove "/api" prefix from the path
},
'/socket.io': {
target: 'ws://localhost:3000',
// target: 'wss://odyssey.wancat.cc',
ws: true,
},
},