gpt4 book ai didi

connection - 连接到 redistogo 出现错误 :-

转载 作者:可可西里 更新时间:2023-11-01 11:46:20 25 4
gpt4 key购买 nike

尝试通过以下 redistogo 凭据连接到 redis 会出错。

var redisClient = require('redis').createClient({
host: 'birdeye.redistogo.com',
port: 1222,
db: 'redistogo',
pass: '012345c2f2402f7878588dd5fb129'
});

获取错误:-

Error Error: Redis connection to 127.0.0.1:[object Object] failed - getaddrinfo ENOTFOUND

最佳答案

var redisClient = require('redis').createClient( 1234, 'birdeye.redistogo.com', {detect_buffers: true});

连接。

redis.createClient(port, host, options)

Create a new client connection. port defaults to 6379 and host defaults to 127.0.0.1. If you have redis-server running on the same computer as node, then the defaults for port and host are probably fine. options in an object with the following possible properties:

来自 node_redis

关于connection - 连接到 redistogo 出现错误 :-,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20303249/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com