Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从 Node.js 应用程序连接 AWS elasticache redis?
您可以使用该软件包ioredis 并建立这样的连接
ioredis
const Redis = require('ioredis') const redis = new Redis({ port: 6379, host: 'your-redis-host', connectTimeout: 10000 // optional });
您正在连接到 Redis。在这方面,它是一项托管 AWS 服务这一事实并不那么重要。
因此,请使用实现 Redis 客户端接口的 Node.js 包,例如: