Skip to content

Commit 10bf06c

Browse files
committed
chore(backend): add version to info endpoint
1 parent 9c2348d commit 10bf06c

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

backend/src/index.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ app.use('/', router);
4141
app.get('/', (_, res) => {
4242
res.send('Hello, world!');
4343
});
44-
app.get("/cache-info", async (_, res) => {
44+
app.get("/info", async (_, res) => {
4545
res.json({
46-
size: cache.size, // # of entries
47-
maxSize: cache.maxSize, // max allowed
48-
calculatedSize: cache.calculatedSize, // total bytes used
49-
TTL: TTL
46+
version: pkg.version,
47+
cache: {
48+
size: cache.size, // # of entries
49+
maxSize: cache.maxSize, // max allowed
50+
calculatedSize: cache.calculatedSize, // total bytes used
51+
TTL: TTL
52+
},
5053
});
5154
});
5255

0 commit comments

Comments
 (0)