Last active
September 25, 2022 22:20
-
-
Save iMichaelOwolabi/ab7e7144aa3ea5e6033e7cdd22a2ee70 to your computer and use it in GitHub Desktop.
Redis enterprise connection file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { config } from 'dotenv'; | |
import { Client } from 'redis-om'; | |
config(); | |
const redisCloudConnectionString = `redis://${process.env.REDIS_DB_USER}:${process.env.REDIS_DB_PASS}@${process.env.REDIS_DB_URL}`; | |
const redisClient = new Client(); | |
await redisClient.open(redisCloudConnectionString); | |
export { redisClient }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment