{"id":345,"date":"2014-03-18T17:08:39","date_gmt":"2014-03-18T17:08:39","guid":{"rendered":"http:\/\/nikola-breznjak.com\/blog\/?p=345"},"modified":"2015-08-20T11:37:04","modified_gmt":"2015-08-20T11:37:04","slug":"deploying-mongodb-and-node-js-application-on-openshift","status":"publish","type":"post","link":"https:\/\/nikola-breznjak.com\/blog\/javascript\/nodejs\/deploying-mongodb-and-node-js-application-on-openshift\/","title":{"rendered":"Deploying MongoDB and Node.js application on OpenShift"},"content":{"rendered":"<p>This is a post about getting started with OpenShift Online on a Windows machine by deploying a MongoDB, Node.js and RockMongo application for free. The reason why this wasn&#8217;t a title is that it&#8217;s just too darn long :). Cool, with getting that off my chest, we can now start&#8230;<\/p>\n<blockquote><p><a href=\"https:\/\/www.openshift.com\/products\/online\">OpenShift Online<\/a>\u00a0&#8211;\u00a0Red Hat&#8217;s public cloud application development and hosting platform that automates the provisioning, management and scaling of applications so that you can focus on writing the code for your business, startup, or next big idea.<\/p><\/blockquote>\n<p><span style=\"font-size: medium;\"><span style=\"font-style: normal;\">If you&#8217;ve tried OpenShift, you may have come across this <a href=\"https:\/\/www.youtube.com\/watch?v=d7wJH1O781s\">offical how-to video<\/a>\u00a0only to find it completely useless. The accompanying <a href=\"https:\/\/www.openshift.com\/blogs\/getting-started-with-mongodb-on-nodejs-hosting\">official blog post<\/a>\u00a0is way better but still lacks some exact example code on, for example, how to connect to MongoDB from Node.js. Read on to see how I did it.<\/span><\/span><\/p>\n<p>First, you have to <a href=\"https:\/\/www.openshift.com\/app\/account\/new\">create a new OpenShift<\/a> account in case you don&#8217;t have one already.<\/p>\n<p>Once you login to the site you get a nice looking dashboard and in order to create a new application you could click on the <em>Add application<\/em> button:<br \/>\n<a href=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_login.jpg\" rel=\"lightbox[345]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-349\" src=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_login-1024x394.jpg\" alt=\"openshift_login\" width=\"604\" height=\"232\" srcset=\"https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_login-1024x394.jpg 1024w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_login-300x115.jpg 300w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_login.jpg 1146w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p>which would then offer really a lot of options:<br \/>\n<a href=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_applist.jpg\" rel=\"lightbox[345]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-348\" src=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_applist-1024x859.jpg\" alt=\"openshift_applist\" width=\"604\" height=\"506\" srcset=\"https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_applist-1024x859.jpg 1024w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_applist-300x251.jpg 300w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_applist.jpg 1149w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p>Setting up WordPress is easy as clicking the WordPress icon and naming your app on the next page:<br \/>\n<a href=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp.jpg\" rel=\"lightbox[345]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-350\" src=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp.jpg\" alt=\"openshift_wp\" width=\"686\" height=\"842\" srcset=\"https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp.jpg 686w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp-244x300.jpg 244w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/a><br \/>\nand clicking the <strong>Create Application<\/strong> button. After the process finishes (few mins) you get the instructions on how to alter the application:<br \/>\n<a href=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp_done.jpg\" rel=\"lightbox[345]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-353\" src=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp_done-1024x622.jpg\" alt=\"openshift_wp_done\" width=\"604\" height=\"366\" srcset=\"https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp_done-1024x622.jpg 1024w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp_done-300x182.jpg 300w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp_done.jpg 1154w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><br \/>\nBasically, you clone the application&#8217;s source code with git and after doing some changes you push them back. At this point, all you have to do is visit the link of your newly created application (you can see the link in your Applications tab in the OpenShift admin interface) and you&#8217;ll get the WordPress init install screen:<br \/>\n<a href=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp_isntall.jpg\" rel=\"lightbox[345]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-354\" src=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp_isntall.jpg\" alt=\"openshift_wp_isntall\" width=\"757\" height=\"941\" srcset=\"https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp_isntall.jpg 757w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_wp_isntall-241x300.jpg 241w\" sizes=\"auto, (max-width: 757px) 100vw, 757px\" \/><\/a><\/p>\n<p>If you ever installed WordPress before everything should be familiar from now on. And there you have it &#8211; you have WordPress installed in a matter of few clicks.<\/p>\n<h3>Keep calm and roll up your sleves<\/h3>\n<p>You may be wondering where&#8217;s the MongoDB and Node.js from the title? Hack on&#8230;<\/p>\n<p>So, we saw how easy it was to create an app from web admin interface, but\u00a0since we&#8217;re devs and we loove terminal (don&#8217;t we ;)) we&#8217;re gonna take a different route here. OpenShift offers the\u00a0<em>OpenShift Client tools<\/em> aka <strong>rhc<\/strong>. In order to install rhc you first have to have Ruby installed, and the easiest way to do this on a Windows machine is to install the <a href=\"http:\/\/rubyinstaller.org\/\">RubyInstaller<\/a>:<\/p>\n<p><a href=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rubyinstaller.jpg\" rel=\"lightbox[345]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-351\" src=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rubyinstaller.jpg\" alt=\"openshift_rubyinstaller\" width=\"936\" height=\"342\" srcset=\"https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rubyinstaller.jpg 936w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rubyinstaller-300x109.jpg 300w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/a><\/p>\n<p>Just click the big red download button and I&#8217;m sure you now how to take it from there. Important note though, while installing just make sure that you check the <strong>Add Ruby executables to your PATH<\/strong> option:<br \/>\n<a href=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rubypath.jpg\" rel=\"lightbox[345]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-352\" src=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rubypath.jpg\" alt=\"openshift_rubypath\" width=\"504\" height=\"390\" srcset=\"https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rubypath.jpg 504w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rubypath-300x232.jpg 300w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/a><\/p>\n<p>After the installation is done you can fire up your terminal (I use <a href=\"http:\/\/sourceforge.net\/projects\/console\/\">Console 2<\/a>, and you can see my settings here: <a href=\"http:\/\/nikola-breznjak.com\/blog\/quick-tips\/customize-console-2-on-windows-machine\/\">Customize Console 2 on Windows machine<\/a>) and run<\/p>\n<pre class=\"lang:default decode:true\">gem install rhc<\/pre>\n<p>and once this is done just run <span class=\"lang:default decode:true  crayon-inline \">rhc setup<\/span>\u00a0 (this is an important part for us Windows users, as the official documentation on <a href=\"https:\/\/www.openshift.com\/developers\/rhc-client-tools-install\">Installing OpenShift RHC Client Tools<\/a>\u00a0says we should only run <span class=\"lang:default decode:true  crayon-inline\">rhc<\/span>\u00a0, and that does not work &#8211; as noted by the comments on that post).<\/p>\n<p>Now we can use rhc to create a new application. To create a new application named <strong>myTest<\/strong>\u00a0with Node.js and MongoDB you have to run:<\/p>\n<pre class=\"lang:default decode:true\">rhc app create myTest nodejs-0.10 mongodb-2.4<\/pre>\n<p>and you&#8217;ll get an output similar to this:<\/p>\n<pre class=\"lang:default decode:true\">C:\\Users\\Nikola\\Desktop&gt;rhc app create myTest nodejs-0.10 mongodb-2.4\r\nDL is deprecated, please use Fiddle\r\nApplication Options\r\n-------------------\r\nDomain:     chavo\r\nCartridges: nodejs-0.10, mongodb-2.4\r\nGear Size:  default\r\nScaling:    no\r\n\r\nCreating application 'myTest' ... done\r\n\r\n  MongoDB 2.4 database added.  Please make note of these credentials:\r\n\r\n   Root User:     admin\r\n   Root Password: ..bip..Bip..\r\n   Database Name: mytest\r\n\r\nConnection URL: mongodb:\/\/$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT\/\r\n\r\nWaiting for your DNS name to be available ... done\r\n\r\nCloning into 'mytest'...\r\nThe authenticity of host 'mytest-chavo.rhcloud.com (54.235.21.98)' can't be established.\r\nRSA key fingerprint is cf:ee:77:cb:0e:fc:02:d7:72:7e:ae:80:c0:90:88:a7.\r\nAre you sure you want to continue connecting (yes\/no)? yes\r\nWarning: Permanently added 'mytest-chavo.rhcloud.com,54.235.21.98' (RSA) to the list of known hosts.\r\nEnter passphrase for key '\/c\/Users\/Nikola\/.ssh\/id_rsa':\r\nremote: Counting objects: 21, done.\r\nremote: Compressing objects: 100% (17\/17), done.\r\nReceiving objects: 100% (21\/21), 20.22 KiB, done.ceiving objects:  90% (19\/21)\r\n\r\nYour application 'mytest' is now available.\r\n\r\n  URL:        http:\/\/mytest-chavo.rhcloud.com\/\r\n  SSH to:     532812f94382eca22b000657@mytest-chavo.rhcloud.com\r\n  Git remote: ssh:\/\/532812f94382eca22b000657@mytest-chavo.rhcloud.com\/~\/git\/mytest.git\/\r\n  Cloned to:  C:\/Users\/Nikola\/Desktop\/mytest\r\n\r\nRun 'rhc show-app myTest' for more details about your app.<\/pre>\n<p>If you&#8217;re concerned about that &#8216;<em>DL is deprecated, please use Fiddle<\/em>&#8216;, don&#8217;t be as it&#8217;s a mere warning as they say\u00a0<a href=\"http:\/\/stackoverflow.com\/questions\/15590450\/ruby-2-0-0p0-irb-error-dl-is-deprecated-please-use-fiddle\">on Stackoverflow<\/a>\u00a0(or if you want to explore this topic further make sure you check this question on SO).<\/p>\n<p>If you get an error saying that there&#8217;s no such <em>cartridge<\/em> you will get a list of all the available cartridges which you can use, so just adjust the above command accordingly<\/p>\n<pre class=\"lang:default decode:true\">C:\\Users\\Nikola\\Desktop&gt;rhc app create\r\nDL is deprecated, please use Fiddle\r\nWhen creating an application, you must provide a name and a cartridge from the\r\nlist below:\r\n\r\nShort Name      Full name\r\n==========      =========\r\ndiy-0.1         Do-It-Yourself 0.1\r\njbossas-7       JBoss Application Server 7\r\njbosseap-6      JBoss Enterprise Application Platform 6\r\njenkins-1       Jenkins Server\r\nnodejs-0.10     Node.js 0.10\r\nnodejs-0.6      Node.js 0.6\r\nperl-5.10       Perl 5.10\r\nphp-5.3         PHP 5.3\r\nzend-5.6        PHP 5.3 with Zend Server 5.6\r\nphp-5.4         PHP 5.4\r\nzend-6.1        PHP 5.4 with Zend Server 6.1\r\npython-2.6      Python 2.6\r\npython-2.7      Python 2.7\r\npython-3.3      Python 3.3\r\nruby-1.8        Ruby 1.8\r\nruby-1.9        Ruby 1.9\r\njbossews-1.0    Tomcat 6 (JBoss EWS 1.0)\r\njbossews-2.0    Tomcat 7 (JBoss EWS 2.0)\r\njboss-vertx-2.1 Vert.x 2.1\r\n\r\nPlease specify the name of the application and the web cartridge to install\r\nUsage: rhc app-create &lt;name&gt; &lt;cartridge&gt; [... &lt;cartridge&gt;] [... VARIABLE=VALUE]\r\n[-n namespace]\r\nPass '--help' to see the full list of options<\/pre>\n<h3>Keep on rockin&#8217; on<\/h3>\n<p>MongoDB\u00a0is an open-source document database, and the <a href=\"https:\/\/www.mongodb.org\/\">leading NoSQL database<\/a>.\u00a0In order to add\u00a0<a href=\"http:\/\/rockmongo.com\/\">RockMongo\u00a0<\/a>MongoDB administration, which is a web front-end for interacting with your MongoDB, you have to\u00a0execute this command:<\/p>\n<pre class=\"lang:default decode:true\">rhc cartridge add rockmongo<\/pre>\n<p>after which you get an output similar to this:<\/p>\n<pre class=\"lang:default decode:true\">C:\\Users\\Nikola\\Desktop\\mytest&gt;rhc cartridge add rockmongo\r\nDL is deprecated, please use Fiddle\r\nUsing rockmongo-1.1 (RockMongo 1.1) for 'rockmongo'\r\nAdding rockmongo-1.1 to application 'mytest' ... done\r\n\r\nrockmongo-1.1 (RockMongo 1.1)\r\n-----------------------------\r\n  Gears:          Located with mongodb-2.4, nodejs-0.10\r\n  Connection URL: https:\/\/mytest-chavo.rhcloud.com\/rockmongo\/\r\n\r\nPlease make note of these MongoDB credentials:\r\n  RockMongo User: admin\r\n  RockMongo Password: ..i.aint.telin'..\r\nURL: https:\/\/mytest-chavo.rhcloud.com\/rockmongo\/<\/pre>\n<p>If you login to RockMongo by using the username and pass provided you will get a simple but useful interface:<br \/>\n<a href=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rockmongo.jpg\" rel=\"lightbox[345]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-356\" src=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rockmongo.jpg\" alt=\"openshift_rockmongo\" width=\"868\" height=\"306\" srcset=\"https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rockmongo.jpg 868w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_rockmongo-300x105.jpg 300w\" sizes=\"auto, (max-width: 868px) 100vw, 868px\" \/><\/a><\/p>\n<p>However, if you prefer to do it via shell, you can do this:<\/p>\n<pre class=\"lang:default decode:true\">rhc ssh<\/pre>\n<p>and after that start interactive command-line interface by typing\u00a0<span class=\"lang:default decode:true  crayon-inline\">mongo<\/span>\u00a0:<\/p>\n<pre class=\"lang:default decode:true\">[mytest-chavo.rhcloud.com 532812f94382eca22b000657]\\&gt; mongo\r\nMongoDB shell version: 2.4.6\r\nconnecting to: 127.9.197.130:27017\/admin\r\nWelcome to the MongoDB shell.\r\nFor interactive help, type \"help\".\r\nFor more comprehensive documentation, see\r\n        http:\/\/docs.mongodb.org\/\r\nQuestions? Try the support group\r\n        http:\/\/groups.google.com\/group\/mongodb-user<\/pre>\n<p>Now let&#8217;s select a database, which will be same as your app&#8217;s name.<\/p>\n<pre class=\"lang:default decode:true\">&gt; use mytest\r\nswitched to db mytest<\/pre>\n<p>To insert some record we can do something like this:<\/p>\n<pre class=\"lang:default decode:true\">&gt; var a = {\"user\":\"nikola\", points:10};\r\n&gt; db.scores.insert(a);<\/pre>\n<p>and check if it was successfully inserted:<\/p>\n<pre class=\"lang:default decode:true\">&gt; db.scores.find();\r\n{ \"_id\" : ObjectId(\"53284189d6e5e4aedb1fbafd\"), \"user\" : \"nikola\", \"points\" : 10 }<\/pre>\n<p>To query this information with Node.js you first have to install <a href=\"https:\/\/github.com\/mafintosh\/mongojs\">mongojs<\/a> with <span class=\"lang:default decode:true  crayon-inline \">npm install mongojs<\/span>\u00a0. Then open up the <span class=\"lang:default decode:true  crayon-inline \">server.js<\/span>\u00a0\u00a0file (it is in the root folder of your application) and add these lines in the <span class=\"lang:default decode:true  crayon-inline \">self.createRoutes<\/span>\u00a0\u00a0object:<\/p>\n<pre class=\"lang:default decode:true\">self.routes['\/db'] = function(req, res) {\r\n    var mongojs = require('mongojs');\r\n    var dbName = \"\/mytest\";\r\n    var connection_string = process.env.OPENSHIFT_MONGODB_DB_USERNAME + \":\" +  process.env.OPENSHIFT_MONGODB_DB_PASSWORD + \"@\" + process.env.OPENSHIFT_MONGODB_DB_HOST + dbName;\r\n    var db = mongojs(connection_string, ['scores']);\r\n    var books = db.collection('scores');\r\n\r\n    db.scores.find(function(err, docs) {\r\n       res.send(docs); \r\n    });\r\n};<\/pre>\n<h3>All aboard, and ready to take-off<\/h3>\n<p>Now it&#8217;s time to add the changes to the staging state with\u00a0<span class=\"lang:default decode:true  crayon-inline \">git add .<\/span>\u00a0(you may wanna check <a href=\"http:\/\/git-scm.com\/\">Git<\/a> if this looks daunting). You can check the status of the files with\u00a0<span class=\"lang:default decode:true  crayon-inline \">git status<\/span>\u00a0. To commit the changes you have to execute:\u00a0\u00a0<span class=\"lang:default decode:true  crayon-inline\">git commit -a -m &#8220;Added code to talk to db&#8221;<\/span>\u00a0and finally\u00a0<span class=\"lang:default decode:true  crayon-inline \">git push<\/span>\u00a0 to send the changes to OpenShift for deployment.<\/p>\n<p><span style=\"line-height: 1.5;\">Now, if you followed this tutorial, on the link\u00a0http:\/\/mytest-chavo.rhcloud.com<\/span><strong style=\"line-height: 1.5;\">\/db<\/strong><span style=\"line-height: 1.5;\"> (notice this db here, and ofc exact link would reflect to your app) you should get this output:<\/span><\/p>\n<p><a href=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_dboutput.jpg\" rel=\"lightbox[345]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-367\" src=\"http:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_dboutput.jpg\" alt=\"openshift_dboutput\" width=\"360\" height=\"165\" srcset=\"https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_dboutput.jpg 360w, https:\/\/nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/03\/openshift_dboutput-300x137.jpg 300w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/><\/a><\/p>\n<p>And a quick closing with with one useful command to get the overview of the app settings:<\/p>\n<pre>C:\\Users\\Nikola\\Desktop\\mytest&gt;rhc app show\r\nDL is deprecated, please use Fiddle\r\nmytest @ http:\/\/mytest-chavo.rhcloud.com\/ (uuid: 532812f94382eca22b000657)\r\n--------------------------------------------------------------------------\r\n  Domain:     chavo\r\n  Created:    10:33 AM\r\n  Gears:      1 (defaults to small)\r\n  Git URL:    ssh:\/\/532812f94dd2eca22b000657@mytest-chavo.rhcloud.com\/~\/git\/mytest.git\/\r\n  SSH:        532812f94382eca22b000657@mytest-chavo.rhcloud.com\r\n  Deployment: auto (on git push)\r\n\r\n  mongodb-2.4 (MongoDB 2.4)\r\n  -------------------------\r\n    Gears:          Located with nodejs-0.10, rockmongo-1.1\r\n    Connection URL: mongodb:\/\/$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT\/\r\n    Database Name:  mytest\r\n    Password:       ..ccc...\r\n    Username:       admin\r\n\r\n  nodejs-0.10 (Node.js 0.10)\r\n  --------------------------\r\n    Gears: Located with mongodb-2.4, rockmongo-1.1\r\n\r\n  rockmongo-1.1 (RockMongo 1.1)\r\n  -----------------------------\r\n    Gears:          Located with mongodb-2.4, nodejs-0.10\r\n    Connection URL: https:\/\/mytest-chavo.rhcloud.com\/rockmongo\/<\/pre>\n<p><span style=\"line-height: 1.5;\">And this is it, now it&#8217;s your time to make something useful with it!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a post about getting started with OpenShift Online on a Windows machine by deploying a MongoDB, Node.js and RockMongo application for free. The reason why this&hellip;<\/p>\n","protected":false},"author":1,"featured_media":346,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,4],"tags":[22,21,23],"class_list":["post-345","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-codeproject","category-nodejs","tag-mongodb-2","tag-openshift","tag-windows-2"],"_links":{"self":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/comments?post=345"}],"version-history":[{"count":17,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/345\/revisions"}],"predecessor-version":[{"id":2123,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/345\/revisions\/2123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media\/346"}],"wp:attachment":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media?parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/categories?post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/tags?post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}