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:
John
2026-06-16 16:29:06 -07:00
parent 680e2c9427
commit 9ecfa73831
13 changed files with 1702 additions and 45 deletions
+3 -1
View File
@@ -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,