Add embedded Express admin API and unified dev workflow.
Move admin backend into this repo (Express + MySQL on :8085) so npm run dev starts both API and Vite, with updated env defaults and Caddy config for gadm.tkmind.cn. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-1
@@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), '');
|
||||
const backendTarget = env.ADM_DEV_BACKEND ?? 'http://127.0.0.1:8081';
|
||||
const backendTarget = env.ADM_DEV_BACKEND ?? 'http://127.0.0.1:8085';
|
||||
|
||||
return {
|
||||
plugins: [react()],
|
||||
@@ -11,6 +11,7 @@ export default defineConfig(({ mode }) => {
|
||||
host: true,
|
||||
port: 5174,
|
||||
strictPort: true,
|
||||
allowedHosts: ['gadm.tkmind.cn', 'localhost', '127.0.0.1'],
|
||||
proxy: {
|
||||
'/api': backendTarget,
|
||||
'/auth': backendTarget,
|
||||
@@ -21,6 +22,7 @@ export default defineConfig(({ mode }) => {
|
||||
host: '127.0.0.1',
|
||||
port: 5174,
|
||||
strictPort: true,
|
||||
allowedHosts: ['gadm.tkmind.cn', 'localhost', '127.0.0.1'],
|
||||
proxy: {
|
||||
'/api': backendTarget,
|
||||
'/auth': backendTarget,
|
||||
|
||||
Reference in New Issue
Block a user