RethinkDB:​​基本JavaScript示例的问题

dav*_*dhq 0 javascript timeout rethinkdb

我有服务器在端口上运行8080,我可以看到网络界面......

当我尝试从命令行运行此示例时,如下所示:( node test.js节点版本:) 4.1.0,我得到:

playground/rethink/node_modules/rethinkdb/node_modules/bluebird/js/main/async.js:43
    fn = function () { throw arg; };
                       ^
ReqlTimeoutError: Could not connect to localhost:8080, operation timed out.
Run Code Online (Sandbox Code Playgroud)

为什么?

我通过Homebrew安装了RethinkDB,我在小牛队.

Anc*_*hor 5

我假设您将演示代码中的端口号更改为8080?

r.connect({ host: 'localhost', port: 28015 }, ...

不要那样做.

端口8080保留用于http管理连接,而客户端驱动程序连接通过端口28015.将其保留在端口28015并再次尝试.