Add backend and frontend

This commit is contained in:
Gk0Wk
2024-04-07 15:04:00 +08:00
parent 49fdd9cc43
commit 84a7cb1b7e
233 changed files with 29927 additions and 0 deletions

25
frontend/modern.config.ts Normal file
View File

@@ -0,0 +1,25 @@
import { URL } from 'url';
import { appTools, defineConfig } from '@modern-js/app-tools';
const apiBase = new URL(process.env.API_BASE || 'http://localhost:8000');
// https://modernjs.dev/en/configure/app/usage
export default defineConfig({
bff: {
proxy: {
'/api': {
target: apiBase.origin,
changeOrigin: true,
pathRewrite: { '^/api': apiBase.pathname },
},
},
},
runtime: {
router: true,
},
plugins: [
appTools({
bundler: 'experimental-rspack',
}),
],
});