expressjs -> nextjs

This commit is contained in:
Ludwig Lehnert
2026-03-27 19:50:53 +01:00
parent bcaec8636d
commit 8b937eee72
34 changed files with 3769 additions and 3078 deletions

25
nextjs/next.config.mjs Normal file
View File

@@ -0,0 +1,25 @@
/** @type {import('next').NextConfig} */
const uploadMaxBytes = Number.parseInt(process.env.UPLOAD_MAX_BYTES || '0', 10);
const actionBodySizeLimit = Number.isFinite(uploadMaxBytes) && uploadMaxBytes > 0
? `${uploadMaxBytes}`
: '1gb';
const nextConfig = {
poweredByHeader: false,
experimental: {
serverActions: {
bodySizeLimit: actionBodySizeLimit,
},
},
serverExternalPackages: ['sqlite3'],
async headers() {
return [
{
source: '/:path*',
headers: [{ key: 'X-Content-Type-Options', value: 'nosniff' }],
},
];
},
};
export default nextConfig;