Todo App
- Vue 3 + Typescript + Vite
- Vite2.x
// vite.config.ts
// config proxy
server: {
proxy: {
'/api': {
target: 'http://localhost:4000',
changeOrigin: true,
// /api/todo -> http://localhost:4000/todo
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},