Commit bac5d6b8 authored by 越 贾's avatar 越 贾
Browse files

2025-08-23: first version which meets basic requirements of backend

parent 5a962098
//src/middleware.ts
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
// middleware.ts - 简化版本,因为jwt需要在API路由内部验证
export function middleware(req: NextRequest) {
// 中间件不验证JWT(因为Edge Runtime不支持jsonwebtoken包)
// JWT验证移到各个API路由内部处理
return NextResponse.next();
}
export const config = {
matcher: '/api/:path*'
}
\ No newline at end of file
{
"compilerOptions": {
"target": "ES2017",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsxImportSource": "react", // 必须新增这行
"incremental": true,
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
},
"types": [
"react",
"react-dom",
"next"
], // 确保这行存在
"forceConsistentCasingInFileNames": true,
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment