feat: migrate to Next.js 14 (App Router + Route Handlers)
- Replace Express server with Next.js Route Handlers (16 API routes) - Rewrite index.html SPA as React components (feed, post, admin, modals) - Move style.css to app/globals.css with dark/light themes intact - Add lib/db.js, lib/auth.js (JWT), lib/api.js (client API wrapper) - Server binds 0.0.0.0 by default; host/port configurable via config.js - Uploads served via /api/uploads route (rewrite keeps /uploads/ URLs) - Multi-stage dockerfile using standalone output
This commit is contained in:
1 parent
ef1318da66
commit
281460fb03
52 files changed
+2833
-3372
No files matched your search
@@ -21,6 +21,11 @@ const CONFIG = {
|
||||
// 优先顺序:环境变量 PORT > 此处配置 > 默认 3000
|
||||
// 设为 null 则使用环境变量或默认值
|
||||
SERVER_PORT: null,
|
||||
|
||||
// 可选:服务端监听地址(仅服务端读取,浏览器端忽略)
|
||||
// 优先顺序:环境变量 HOST > 此处配置 > 默认 0.0.0.0(所有网卡)
|
||||
// 设为 '127.0.0.1' 可仅本机访问;设为 '0.0.0.0' 或 null 则允许局域网访问
|
||||
SERVER_HOST: null,
|
||||
};
|
||||
|
||||
// ===== 不要修改下面 =====
|
||||
|
||||
Reference in new issue
Block a user