Node.js Brief Beginners Introduction 01

Video Tutorial

<span style=”color:#0782c1">Getting Started</span>

Node js is an Open-source Cross-Platform Development Environment for using JavaScript on the Back-end (Server-Side), it is built on top of chrome’s v8 engine, here are some features of node.js

Efficient Fast and Easy to get Started With

Large Support Community and Large Set of Modules

Single Threaded, Non-Blocking I/O

Asynchronous Calls/Responses with I/O

Event Driven System

the Event-Based System allows you to create a real-time application such as (Chat apps, UI based Apps…) which make node.js suitable for that job especially because of the large library of modules available on the NPM.

NPM is shipped alongside Node.js, So all you need to do is to install Node.

Now you need to install Node.js in order to start your development Journey it is cross-platform just choose yours and install it on your machine then you are good to go, make sure also to install a Terminal since we are going to need it for running NPM Commands and Downloading/Installing Modules (For Windows Users).

After Making sure that everything is set and ready to run, open up your terminal and make sure to cd on your project’s Root Dir then initialize the Repository (Your App)

#Cd to your App Root Dir 
npm init

NPM going to prompt you a couple of question like (App name, License, Version…) make sure to fill in the blanks, after finishing the initialization Process you are going to notice a new file under your project’s root folder (package.json) and that’s what will Make Node js Identify our App and, install modules and many other things.

That is all you need in order to initialize a project with Nodejs, easy, isn’t it? Now, this is not all you can do, there still a couple of things to explain before you can start a project alongside NodeJS.

Using REPL

So for those of you who don’t know what is REPL, it actually stands for Read, Evaluate, Print and Loop and they are the basic operations for an Interactive Command Line Interpreter, and that what will REPL gives it being shipped with Nodejs and it is pretty much like (Shell or bash) that will allow you to type javascript code on your terminal pretty much like doing it on an Editor then running on the Interpreter (Your Browser).

I know that seems a bit confusing, but it is actually very simple to use and super useful for you as you are going to use nodejs for the rest of your life.

To get into it, open up your terminal

#you can access this command from any Dir, since you have installed Node js Globaly

Then you can use as you normally do on javascript

> ver me = 'NodeJS'
> console.log('This is Me: ', me);

# See the Above Console.log just prints us the variable name, you can use it for Quick testing Purposes.

You can REPL For Doing pretty much any operation, include other modules, test a quick functionality and much more, I really recommend you use it especially since you are going to deal with Node js Apps.

So that was it for that tutorial, very brief intro in tor node js and explaining REPL, we will cover more advanced Topics in the next tutorials.

What’s Next

On the next tutorial, we will cover installing Modules using NPM and How actually modules Works in order to use the most of it.

No Comments Yet