Categories: JavascriptWeb

NodeJS – How to Develop Javascript using Console (Node)

This article represents tips on how to do Javascript programming using Console with the help of NodeJS. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos.
Following are the key points described later in this article:
  • Setting up NodeJS Environment
  • Program Hello World & Execute on Console
Setting up NodeJS Environment

I recommend using Docker environment for setting up the NodeJS environment. Using that you could work on CentOS and NodeJS and make bets use of NodeJS. Follow the instructions on following page, Dummies Notes – Get Started with Docker Hello World to setup the Docker environment. Recently, Docker has launched a one-click docker setup tool, namely, Docker Toolbox whose details could be found on this page, The fastest way to get Docker running in development. Good news is that this new tool automatically migrate existing images from existing boot2docker-vm. Once docker is setup, following the instructions on following page, How to Install NodeJS on Docker, to setup NodeJS in your Docker Centos container.

 

Program Hello World & Execute on Console

Once NodeJS is setup using above instructions, create a simplistic hello world program (hello-world.js) such as following:

console.log( "Hello World");

Execute the hello-world.js using Node in following manner:

node hello-world.js

Above would print “Hello World”.

 

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning and BI. I would love to connect with you on Linkedin. Check out my books titled as Designing Decisions, and First Principles Thinking.

Share
Published by
Ajitesh Kumar

Recent Posts

The Watermelon Effect: When Green Metrics Lie

We’ve all been in that meeting. The dashboard on the boardroom screen is a sea…

21 hours ago

Coefficient of Variation in Regression Modelling: Example

When building a regression model or performing regression analysis to predict a target variable, understanding…

3 months ago

Chunking Strategies for RAG with Examples

If you've built a "Naive" RAG pipeline, you've probably hit a wall. You've indexed your…

3 months ago

RAG Pipeline: 6 Steps for Creating Naive RAG App

If you're starting with large language models, you must have heard of RAG (Retrieval-Augmented Generation).…

3 months ago

Python: List Comprehension Explained with Examples

If you've spent any time with Python, you've likely heard the term "Pythonic." It refers…

3 months ago

Large Language Models (LLMs): Four Critical Modeling Stages

Large language models (LLMs) have fundamentally transformed our digital landscape, powering everything from chatbots and…

6 months ago