feat: 登录界面优化与API代理配置

- 移除登录页面的登录/注册切换,只保留登录功能
- 添加API代理配置支持远程访问
- 添加favicon.ico
- 后端CORS配置支持前端访问

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Developer
2026-03-18 10:54:18 +08:00
co-authored by Claude Opus 4.6
parent a89d4f2402
commit 02f48927a3
5 changed files with 34 additions and 37 deletions
+5 -2
View File
@@ -6,11 +6,14 @@ const cors = require('cors');
const path = require('path');
const app = express();
const PORT = 3500;
const PORT = 3501;
const JWT_SECRET = process.env.JWT_SECRET || 'accountbook_secret_key_2024';
// 中间件
app.use(cors());
app.use(cors({
origin: ['http://localhost:3500', 'http://127.0.0.1:3500'],
credentials: true
}));
app.use(express.json());
app.use(express.static(path.join(__dirname, 'public')));
app.use(express.static(path.join(__dirname, 'frontend/.next')));