Skip to content

Commit

Permalink
feat(general): add keep alive
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Materozzi committed Aug 9, 2024
1 parent 5e73756 commit f60e2f7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
10 changes: 10 additions & 0 deletions app/api/keep-alive/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { db } from "@/lib/db"

export async function GET() {
try {
await db.account.count()
return new Response("alive")
} catch (error) {
return new Response(error)
}
}
14 changes: 8 additions & 6 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ export default function RootLayout({ children }: RootLayoutProps) {
)}
>
<ClientProvider>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
{children}
<Analytics />
<Toaster />
<TailwindIndicator />
</ThemeProvider>
<div>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
{children}
<Analytics />
<Toaster />
<TailwindIndicator />
</ThemeProvider>
</div>
</ClientProvider>
</body>
<PrelineScript />
Expand Down

0 comments on commit f60e2f7

Please sign in to comment.