Complete the code to import the Redis transport from NestJS microservices.
import { [1] } from '@nestjs/microservices';
The Transport enum includes the Redis transport option in NestJS microservices.
Complete the code to create a Redis client options object with host 'localhost'.
const redisOptions = { transport: Transport.REDIS, options: { host: '[1]' } };The host for local Redis server is usually 'localhost'.
Fix the error in the code to correctly create a Redis microservice client.
const client = app.connectMicroservice({ transport: Transport.[1] });The Redis transport is specified as Transport.REDIS in NestJS.
Fill both blanks to create a Redis microservice client with port 6379 and password 'secret'.
const redisClient = app.connectMicroservice({ transport: Transport.REDIS, options: { port: [1], password: '[2]' } });Redis default port is 6379 and the password is set as 'secret' here.
Fill all three blanks to create a Redis microservice client with host 'redis-server', port 6380, and no password.
const client = app.connectMicroservice({ transport: Transport.REDIS, options: { host: '[1]', port: [2], password: [3] } });The host is 'redis-server', port is 6380, and password is set to null to indicate no password.