logo
  • 教程列表
  • SO官方文档
  • 开始使用 Node
    • 从 NPM 安装 RethinkDB 软件包
    • 建立与 RethinkDB 的连接
    • 列出所有数据库
    • 创建一个新数据库
    • 在数据库上创建一个新表
    • 将文档插入表中
    • 从表中查询文档
  1. StackOverflow 文档
  2. rethinkdb 教程
  3. 开始使用 Node
  4. 建立与 RethinkDB 的连接

建立与 RethinkDB 的连接

Created: November-22, 2018

const r = require(rethinkdb);

 placeholderCopyr.connect({host: 'localhost', port: 28015}, (conn) => console.log(conn))

// Or as a promise
 
let rdb_conn;
r.connect({host: 'localhost', port: 28015}).then((conn) => {
  rdb_conn = conn;
}).then(() => {
  // Continue to use rdb_conn
});
  • 列出所有数据库
  • 从 NPM 安装 RethinkDB 软件包

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明