[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:
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.
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
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.
- Kitematic can not start
- 【Kitematic official documents】 FAQ
- [Kitematic official document] command line access
- Docker acquires Kitematic: a great GUI tool
- Trouble asked the docker kitematic for windos several questions
- [Kitematic official document] tutorial: Nginx will be used in static website
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!
Original link: KITEMATIC DOCUMENTATION (translation: Cui Jingwen , Wu Jin Sheng , Tian Haohao proofreading: Xiao Yuanhao )