feat: support serverless deployment (Vercel / Cloudflare Pages)
- Replace bcrypt (native) with bcryptjs (pure JS) — no native build on serverless - Storage abstraction (lib/storage.js): local uploads/ for traditional deploy, S3-compatible (R2/MinIO/S3 via aws4fetch) for serverless - DB pool auto-adapts to serverless (single connection, rotation, timeouts) - next.config.js: standalone output only when DOCKER=1 (serverless skips it) - Docs: serverless deployment section in README, S3 env vars in .env.example
This commit is contained in:
1 parent
83239d498e
commit
ec50efea89
15 files changed
+163
-143
No files matched your search
@@ -1,5 +1,5 @@
|
||||
// POST /api/auth/reset-password — 用恢复码重置密码(公开)
|
||||
import bcrypt from 'bcrypt';
|
||||
import bcrypt from 'bcryptjs';
|
||||
import pool from '@/lib/db';
|
||||
|
||||
export async function POST(req) {
|
||||
|
||||
Reference in new issue
Block a user