Skip to content

Commit

Permalink
Merge pull request #7 from tannnxr/dev
Browse files Browse the repository at this point in the history
create: db directory
  • Loading branch information
tannnxr authored May 28, 2024
2 parents f36c941 + 88b37c1 commit d444abc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/db/cache.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { createClient, RedisClientType } from "redis";
import { Logger, LogType } from "../utils/logging";
import { callbackify } from "util";

enum RedisEnums {
ERROR = 'error'
}

const logger = new Logger(__filename, LogType.DEBUG)

export const shorkCache = createClient();

shorkCache.on(RedisEnums.ERROR, (err) => {
logger.log(`Error: ${err}`)
});

shorkCache.connect()

0 comments on commit d444abc

Please sign in to comment.