2.3 KiB
Executable File
page_title: Kitematic Tutorial: Set up an Nginx web server page_description: Tutorial demonstrating the setup of an Nginx web server using Docker and Kitematic page_keywords: docker, documentation, about, technology, kitematic, gui, rethink, tutorial
Creating a Local RethinkDB Database for Development
In this tutorial, you will:
- Create a RethinkDB Container for Development
- (Advanced) Clone a small Node.js application and write data into RethinkDB.
Setting up RethinkDB in Kitematic
First, if you haven't yet done so, download and start Kitematic. Once open, the app should look like this:
Click on the Create button of the rethinkdb
image listing in the recommended list as shown above. This will download & run a RethinkDB container within a few minutes. Once it's done, you'll have a local RethinkDB database up and running.
Let's start using it to develop a node.js app. For now, let's figure out which IP address and port RethinkDB is listening on. To find out, click the Settings
tab and then the Ports
section:
You can see there that for RethinkDB port 28015
, the container is listening on host 192.168.99.100
and port 49154
(in this example - ports may be different for you). This means you can now reach RethinkDB via a client driver at 192.168.99.100:49154
. Again, this IP address may be different for you.
(Advanced) Saving Data into RethinkDB with a local Node.js App
First, if you don't have it yet, download and install Node.js.
Now, you'll create the RethinkDB example chat to test drive your new database. In your 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
Now, point your browser to http://localhost:8000
. Congratulations, you've successfully used a RethinkDB container in Kitematic to build a real-time chat app. Happy coding!