mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 17:24:12 +00:00
Localization: - Add middleware for locale detection/routing - Add [locale] dynamic route structure - Add i18n utility library (DE/EN support) SEO & Discovery: - Add robots.ts for search engine directives - Add sitemap.ts for XML sitemap generation - Add structuredData.ts for JSON-LD schemas Utilities: - Add search.ts for full-text search functionality - Add tenantAccess.ts for multi-tenant access control - Add envValidation.ts for environment validation Frontend: - Update layout.tsx with locale support - Update page.tsx for localized content - Add API routes for frontend functionality - Add instrumentation.ts for monitoring 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
24 lines
761 B
TypeScript
24 lines
761 B
TypeScript
/**
|
|
* Next.js Instrumentation Hook
|
|
*
|
|
* Wird beim Server-Start ausgeführt. Initialisiert Scheduled Jobs.
|
|
* https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation
|
|
*/
|
|
export async function register() {
|
|
// Nur auf dem Server ausführen, nicht im Edge Runtime
|
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
|
const { getPayload } = await import('payload')
|
|
const config = await import('./payload.config')
|
|
const { initScheduledJobs } = await import('./jobs/scheduler')
|
|
|
|
// Payload initialisieren
|
|
const payload = await getPayload({
|
|
config: config.default,
|
|
})
|
|
|
|
// Scheduled Jobs starten
|
|
initScheduledJobs(payload)
|
|
|
|
console.log('[Instrumentation] Payload und Scheduled Jobs initialisiert.')
|
|
}
|
|
}
|