style: formatting changes
This commit is contained in:
+6
-1
@@ -41,7 +41,12 @@ export class AniwatchAPICache {
|
||||
|
||||
if (!data) {
|
||||
data = await setCB();
|
||||
await this._client?.set(key, JSON.stringify(data), "EX", expirySeconds);
|
||||
await this._client?.set(
|
||||
key,
|
||||
JSON.stringify(data),
|
||||
"EX",
|
||||
expirySeconds
|
||||
);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
+10
-5
@@ -50,9 +50,9 @@ app.get("/v", async (c) =>
|
||||
app.use(cacheConfigSetter(BASE_PATH.length));
|
||||
|
||||
app.basePath(BASE_PATH).route("/hianime", hianimeRouter);
|
||||
app
|
||||
.basePath(BASE_PATH)
|
||||
.get("/anicrush", (c) => c.text("Anicrush could be implemented in future."));
|
||||
app.basePath(BASE_PATH).get("/anicrush", (c) =>
|
||||
c.text("Anicrush could be implemented in future.")
|
||||
);
|
||||
|
||||
app.notFound(notFoundHandler);
|
||||
app.onError(errorHandler);
|
||||
@@ -64,7 +64,9 @@ if (!Boolean(process.env?.ANIWATCH_API_VERCEL_DEPLOYMENT)) {
|
||||
fetch: app.fetch,
|
||||
}).addListener("listening", () =>
|
||||
console.info(
|
||||
"\x1b[1;36m" + `aniwatch-api at http://localhost:${PORT}` + "\x1b[0m"
|
||||
"\x1b[1;36m" +
|
||||
`aniwatch-api at http://localhost:${PORT}` +
|
||||
"\x1b[0m"
|
||||
)
|
||||
);
|
||||
|
||||
@@ -74,7 +76,10 @@ if (!Boolean(process.env?.ANIWATCH_API_VERCEL_DEPLOYMENT)) {
|
||||
|
||||
// don't sleep
|
||||
setInterval(() => {
|
||||
console.log("aniwatch-api HEALTH_CHECK at", new Date().toISOString());
|
||||
console.log(
|
||||
"aniwatch-api HEALTH_CHECK at",
|
||||
new Date().toISOString()
|
||||
);
|
||||
https
|
||||
.get(`https://${ANIWATCH_API_HOSTNAME}/health`)
|
||||
.on("error", (err) => {
|
||||
|
||||
Reference in New Issue
Block a user