You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-01 16:46:54 +03:00
20 lines
332 B
JavaScript
20 lines
332 B
JavaScript
import Redis from 'ioredis';
|
|
|
|
export default async (host) => {
|
|
const client = new Redis({
|
|
host,
|
|
lazyConnect: true
|
|
});
|
|
|
|
await client.connect();
|
|
|
|
return {
|
|
benchmark() {
|
|
return client.ping();
|
|
},
|
|
teardown() {
|
|
return client.disconnect();
|
|
}
|
|
}
|
|
};
|