forked from plura-ai/plura
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57a640a
commit a3cb0e0
Showing
9 changed files
with
239 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Hono } from "hono"; | ||
import { cache } from "@repo/cache"; | ||
|
||
const app = new Hono(); | ||
|
||
app.get("/", async (c) => { | ||
const dbStatus = await cache.lrange("db-latency:history", 0, -1); | ||
const siteStatus = await cache.lrange("site-latency:history", 0, -1); | ||
return c.json({ | ||
dbStatus, | ||
siteStatus, | ||
}); | ||
}); | ||
|
||
app.get("/db", async (c) => { | ||
const dbStatus = await cache.lrange("db-latency:history", 0, -1); | ||
return c.json({ | ||
dbStatus, | ||
}); | ||
}); | ||
|
||
app.get("/site", async (c) => { | ||
const siteStatus = await cache.lrange("site-latency:history", 0, -1); | ||
return c.json({ | ||
siteStatus, | ||
}); | ||
}); | ||
|
||
export default app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.