diff --git a/backend/.env.example b/backend/.env.example index 90332ce..eec048d 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -19,7 +19,7 @@ GOOGLE_CLIENT_ID= # Server Configuration PORT=3001 API_URL=http://localhost:3001 -FRONTEND_URL=http://localhost:3002 +FRONTEND_URL=http://localhost:3019 # Revalidation secret (shared with frontend for on-demand cache revalidation) # Must match the REVALIDATE_SECRET in frontend/.env diff --git a/deploy/spanglish-backend.service b/deploy/spanglish-backend.service index 5f44099..b69a4c3 100644 --- a/deploy/spanglish-backend.service +++ b/deploy/spanglish-backend.service @@ -8,9 +8,9 @@ Type=simple User=spanglish Group=spanglish WorkingDirectory=/home/spanglish/Spanglish/backend +EnvironmentFile=/home/spanglish/Spanglish/backend/.env Environment=NODE_ENV=production Environment=PORT=3018 -EnvironmentFile=/home/spanglish/Spanglish/backend/.env ExecStart=/usr/bin/node dist/index.js Restart=on-failure RestartSec=10 diff --git a/frontend/src/app/llms.txt/route.ts b/frontend/src/app/llms.txt/route.ts index 35d43ff..a0b4a97 100644 --- a/frontend/src/app/llms.txt/route.ts +++ b/frontend/src/app/llms.txt/route.ts @@ -28,7 +28,7 @@ interface LlmsEvent { async function getNextUpcomingEvent(): Promise { try { const response = await fetch(`${apiUrl}/api/events/next/upcoming`, { - next: { tags: ['next-event'] }, + cache: 'no-store', }); if (!response.ok) return null; const data = await response.json(); @@ -41,7 +41,7 @@ async function getNextUpcomingEvent(): Promise { async function getUpcomingEvents(): Promise { try { const response = await fetch(`${apiUrl}/api/events?status=published&upcoming=true`, { - next: { tags: ['next-event'] }, + cache: 'no-store', }); if (!response.ok) return []; const data = await response.json(); @@ -115,7 +115,7 @@ function getEventStatus(event: LlmsEvent): string { async function getHomepageFaqs(): Promise { try { const response = await fetch(`${apiUrl}/api/faq?homepage=true`, { - next: { revalidate: 3600 }, + cache: 'no-store', }); if (!response.ok) return []; const data = await response.json(); @@ -128,6 +128,8 @@ async function getHomepageFaqs(): Promise { } } +export const dynamic = 'force-dynamic'; + export async function GET() { const [nextEvent, upcomingEvents, faqs] = await Promise.all([ getNextUpcomingEvent(),