You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
21 lines
363 B
JavaScript
21 lines
363 B
JavaScript
import { createClient } from '@node-redis/client';
|
|
|
|
export default async (host) => {
|
|
const client = createClient({
|
|
socket: {
|
|
host
|
|
}
|
|
});
|
|
|
|
await client.connect();
|
|
|
|
return {
|
|
benchmark() {
|
|
return client.ping();
|
|
},
|
|
teardown() {
|
|
return client.disconnect();
|
|
}
|
|
};
|
|
};
|