Author - StudySection Post Views - 69 views

A fast-paced introduction to Node.js

What is Node.js?

Node.js is a Javascript runtime environment. Javascript is a programming language typically used in a browser to manipulate the page that renders it in the browser. For example, we can open a popup, a model or any kind of special event as Javascript is a language that runs in a browser that allows you to interact with the web page after it gets loaded. Node.js is a Javascript environment that allows javascript to run on the server-side.

Technical work of Node.js

Node.js uses V8 and V8 is a javascript engine built by Google that runs Javascript in the browser. V8 takes the javascript code and compiles it to machine code. V8 is written in c++.

Installing Node.js and creating the first application

Step 1: Go to, download setup and install it on your computer.
Step 2: After successfully installation, open a command prompt and run the command node -v. It will return the version that has been configured or installed.
Step 3:Create a folder like C:xampp/htdocs/test
Step 4: Create a File test.js within the test folder

Step 5: Write following code:

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/html'});
  res.end('Hello World!');

Step 6: Open a command prompt and enter to the folder C:xampp/htdocs/test and run command node test.js
Output: On URL (http://localhost:8080) you will find the result of whatever you have written in file test.js.for example, I have written “Hello World”

Note: If you will change anything in code in file test.js you need to run command node test.js again to see new changes.

Node.js can do

These are the main features Node.js is used for:
We can manage packages through npm, bower, jspm, etc.
While development tooling we can do module management with webpack, task running and automation through grunt or gulp, linters like eslint or jslint, etc
We can create back-end web applications.
Command-line tools like rimraf.
Desktop applications.

Study Section provides a big list of certification exams through its online platform. The French Certification exam can help you to certify your skills to communicate in the French language. Whether you are new to the language or you are an expert in it, this French certification exam can test the ability of anybody’s command over the French language.

Leave a Reply

Your email address will not be published. Required fields are marked *