1
0
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-07-01 20:09:23 +00:00

Add /check endpoint to app.js for API status verification

This commit is contained in:
SunWuyuan 2025-05-10 21:53:16 +08:00
parent 28f6a6bc80
commit fc066a88ff
No known key found for this signature in database
GPG Key ID: A6A54CF66F56BB64

7
app.js
View File

@ -60,6 +60,13 @@ app.use((req, res, next) => {
app.get("/", (req, res) => {
res.render("index.ejs", { readmeValue: getReadmeValue() });
});
app.get("/check", (req, res) => {
res.json({
status: "success",
message: "API is running",
time: new Date().getTime(),
});
});
// Mount the KV store router
app.use("/", kvRouter);