rethinkdb / rethinkdb-example-nodejs

137 stars 98 forks source link

how to start retinkdb #21

Closed lh8725473 closed 6 years ago

lh8725473 commented 7 years ago

$ node app.js { ReqlDriverError: Could not connect to localhost:28015. connect ECONNREFUSED 127.0.0.1:28015 at ReqlDriverError.ReqlError as constructor at new ReqlDriverError (D:\mygitgub\rethinkdb-example-nodejs\rethinkdb-examp le-nodejs-master\todo-angular-express\node_modules\rethinkdb\errors.js:68:50) at TcpConnection. (D:\mygitgub\rethinkdb-example-nodejs\rethinkdb -example-nodejs-master\todo-angular-express\node_modules\rethinkdb\net.js:94:27)

at TcpConnection.g (events.js:291:16)
at emitOne (events.js:96:13)
at TcpConnection.emit (events.js:188:7)
at Socket.<anonymous> (D:\mygitgub\rethinkdb-example-nodejs\rethinkdb-exampl

e-nodejs-master\todo-angular-express\node_modules\rethinkdb\net.js:705:22) at emitOne (events.js:101:20) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1271:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) name: 'ReqlDriverError', msg: 'Could not connect to localhost:28015.\nconnect ECONNREFUSED 127.0.0.1:28 015', frames: undefined, message: 'Could not connect to localhost:28015.\nconnect ECONNREFUSED 127.0.0. 1:28015' }

jeffreysbrother commented 6 years ago

First fun the command rethinkdb. Then, in another terminal tab, start the server with node app.js.

antoc0d3 commented 2 years ago
  1. Make sure port 28015 is active and open for connection.

  2. must pass a configuration object for example:

    const = config_rethinkdb = { "host": "", "port": , "db": "", "user": "", "password": "" }

    r.connect(config_rethinkdb)