戈壁堂

Knowledge Is Action

STF之Provider系列四

link on JianShu

环境准备

在一台新的机器上从头搭建STF的provider环境。

  • 需要adb服务
  • 可以执行 stf provider服务模块

新机器上的Node环境为V12 版本,没有adb环境。 折腾到最后还是跑起来了。记录一下遇到的可能问题:

STF之RethinkDB一

link on JianShu

quick start

quickstart

#install
npm install rethinkdb 
# start from where it is installed.
$ rethinkdb
...
...
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8080
Listening on cluster addresses: 127.0.0.1, ::1
Listening on driver addresses: 127.0.0.1, ::1
Listening on http addresses: 127.0.0.1, ::1
To fully expose RethinkDB on the network, bind to all addresses by running rethinkdb with the `--bind all` command line option.
Server ready, "gebitangHoster_wil" c4bc2619-a3aa-4edf-9d4e-5c85aee397ff

#use the drivers from Node.js like this:
$ node
r = require('rethinkdb');
r.connect({ host: 'localhost', port: 28015 }, function(err, conn) {
  if(err) throw err;
  r.db('test').tableCreate('tv_shows').run(conn, function(err, res) {
    if(err) throw err;
    console.log(res);
    r.table('tv_shows').insert({ name: 'Star Trek TNG' }).run(conn, function(err, res)
    {
      if(err) throw err;
      console.log(res);
    });
  });
});