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

RethinkDB: trouble with basic JavaScript example

我在端口 8080 上安装了服务器 运行ning,我可以看到 Web 界面...

当我尝试从命令行 运行 this example 时,像这样: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.

为什么?

我通过 Homebrew 安装了 RethinkDB,我在 Mavericks。

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

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

不要那样做。

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