format
This commit is contained in:
parent
b314b361b2
commit
be1495d8b3
@ -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);
|
||||
|
||||
@ -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!"
|
||||
});
|
||||
});
|
||||
|
||||
@ -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;
|
||||
Loading…
x
Reference in New Issue
Block a user