refactor(backend): split log files into separate file
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { FreshContext } from "$fresh/server.ts";
|
||||
import { getMovieCredits } from "@lib/tmdb.ts";
|
||||
import { json } from "@lib/helpers.ts";
|
||||
import { createLogger } from "@lib/log.ts";
|
||||
import { createLogger } from "@lib/log/index.ts";
|
||||
import { createCache } from "@lib/cache.ts";
|
||||
|
||||
type CachedMovieCredits = {
|
||||
@ -10,7 +10,9 @@ type CachedMovieCredits = {
|
||||
};
|
||||
|
||||
const CACHE_INTERVAL = 1000 * 60 * 24 * 30;
|
||||
const cache = createCache<CachedMovieCredits>({ expires: CACHE_INTERVAL });
|
||||
const cache = createCache<CachedMovieCredits>("movie-credits", {
|
||||
expires: CACHE_INTERVAL,
|
||||
});
|
||||
|
||||
const log = createLogger("api/tmdb");
|
||||
|
||||
|
Reference in New Issue
Block a user