[Kitematic Official Documentation] Tutorial: Create a local RethinkDB database

In this tutorial, you will learn:

  • How to create a container for the RethinkDB database
  • Clone a lightweight Node.js application and write data to RethinkDB (advanced)

Set up RethinkDB in Kitematic

First, if you have not installed Kitematic, then download and open it . Kitematic interface as shown below:
86134a50-c1e2-11e4-890f-d0973fa68c84.png

As shown above, click the Create button on the recommended list on the rethinkdb image. It will take a few minutes to download and run a RethinkDB container. Once done, you will have a local RethinkDB database running.
a05ee16c-c1e2-11e4-9816-01a7811c4ca3.png
Let's use it to develop a Node.js application. Now let's find out the IP address and port that RethinkDB is listening on! Amazing! To find which ports it listens to, simply click the Settings tab and select the Ports section:
f3a6a41c-c1ed-11e4-8c75-a3a629c2482e.png
As shown in the figure: We can see RethinkDB's port 28015 , which is listening to the host 192.168.99.100 and the 49154 port (in this case – it may be inconsistent with you). This means that we can connect to RethinkDB using a client driver using the 192.168.99.100:49154 IP address and port. Likewise, this may be inconsistent with the IP address and port on your machine.

Save the data to RethinkDB via the local Node.js application

First, if you have not installed Node.js, then download and install it .

We will create a RethinkDB chat example to test our new database. On the terminal, type:

  Bash-3.2 $ export RDB_HOST = 192.168.99.100 # replace with IP from above step 
Bash-3.2 $ export RDB_PORT = 49154 # replace with Port from above step
Bash-3.2 $ git clone https://github.com/rethinkdb/rethinkdb-example-nodejs-chat
Bash-3.2 $ cd rethinkdb-example-nodejs-chat
Bash-3.2 $ npm install
Bash-3.2 $ npm start

Then open the browser to visit http://localhost:8000 . Congratulations! You have used the RethinkDB container on Kitematic to create an instant chat application. Encoding happy!
efd20074-c1ee-11e4-8943-c19318f2083d.png

Original link: KITEMATIC DOCUMENTATION (translation: Cui Jingwen , Wu Jin Sheng , Tian Haohao proofreading: Xiao Yuanhao )

    Heads up! This alert needs your attention, but it's not super important.