This commit is contained in:
Peter Morton 2023-10-12 19:01:11 -05:00
parent b314b361b2
commit be1495d8b3
4 changed files with 17 additions and 15 deletions

View File

@ -89,9 +89,10 @@ router.all("/", (req, res, next) => {
})
.then(() => {
res.send(decoded);
}).catch((e) => {
})
.catch((e) => {
logger.error(e); // "Uh-oh!"
});;
});
} catch (err) {
logger.error(`Verify failed [${JSON.stringify(err, null, 2)}].`);
next(err);

View File

@ -134,7 +134,8 @@ router.get("/", async (req, res) => {
logger.debug(`Sending data: ${JSON.stringify(data, null, 2)}`);
res.send(data);
}).catch((e) => {
})
.catch((e) => {
logger.error(e); // "Uh-oh!"
});
});

View File

@ -8,4 +8,4 @@ export function isEmpty(obj) {
}
return true;
}
}

View File

@ -1,14 +1,14 @@
import { createClient } from 'redis';
import { createClient } from "redis";
import config from "../config/index.js";
import { logger } from "./index.js";
const client = createClient({
url: config.redis.url
});
url: config.redis.url,
});
client.on('error', err => logger.error('Redis Client Error', err));
client.on("error", (err) => logger.error("Redis Client Error", err));
await client.connect();
logger.info(`Connect store to ${config.redis.url}`)
logger.info(`Connect store to ${config.redis.url}`);
export default client;