mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 02:45:10 +00:00
fix: use process.cwd() for public dir + simplified routes
- Changed publicDir to use process.cwd() for Vercel compatibility - Simplified vercel.json routes: API -> server.js, everything else -> server.js - Express.static will serve files from public/ directory
This commit is contained in:
@@ -34,7 +34,7 @@ dotenv.config();
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 4444;
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const publicDir = path.join(dirname(__filename), "public");
|
||||
const publicDir = path.join(process.cwd(), "public");
|
||||
const allowedOrigins = process.env.ALLOWED_ORIGINS?.split(",");
|
||||
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user