@opengis/fastify-table
Version:
core-plugins
18 lines (14 loc) • 467 B
JavaScript
// import redis from './client.js';
import redisClients from './funcs/redisClients.js';
function close(fastify) {
// redis.quit();
Object.keys(redisClients).forEach((key) => redisClients[key].quit());
}
async function plugin(fastify) {
// const client = getRedis({ db: 0 });
// client.getJSON = client.get;
// fastify.decorate('rclient', client);
// fastify.decorate('getRedis', getRedis);
fastify.addHook('onClose', close);
}
export default plugin;