A NodeJS developer named Warlock, recently joined his dream company as an Enterprise Developer.

On day 1, his boss gave him a Code Repository & his OpenShift Platform Credentials to work his magic.

Warlock got his code,

git clone https://github.com/sclorg/nodejs-ex

But was unclear about how to proceed as he had no idea about OpenShift. He then referred to the OpenShift docs but got confused and overwhelmed by all the new terminologies, DeploymentConfigs, Pods, Services, and Routes mentioned in it. He could barely login into the cluster using oc and thus got frustrated.

Then, one of his friend suggested that he take a look at odo, Warlock instantly took to it, as it had simple, easy to understand concepts like Application, Components, and URLs.

He found it interesting, read the docs further, and started using it.

odo login -u warlock@dream.company -p xxxxxxx
odo app create myapp
odo catalog list components
NAME        PROJECT       TAGS
dotnet      openshift     2.0,latest
httpd       openshift     2.4,latest
nginx       openshift     1.10,1.12,1.8,latest
nodejs      openshift     0.10,10,4,6,8,8-RHOAR,latest
perl        openshift     5.16,5.20,5.24,5.26,latest
php         openshift     5.5,5.6,7.0,7.1,latest
python      openshift     2.7,3.3,3.4,3.5,3.6,latest
ruby        openshift     2.0,2.2,2.3,2.4,2.5,latest
wildfly     openshift     10.0,10.1,11.0,12.0,13.0,8.1,9.0,latest

Woo, Warlock was happy because NodeJS was available in the cluster.

Since he had only one component of the type nodejs, he created the application,

odo create nodejs
odo url create
odo push

Tada, Now he could access his application, everytime he made some changes he did odo push and woah :)

odo watch

Now everytime he changed his code, the changes were automatically reflected in the URL, he did not need to manually push each time.

In this way, Warlock the newbie developed his NodeJS application on OpenShift Platform.

Now, Warlock always uses odo, Warlock is Happy, Be like Warlock :D