Getting Started with Node.js

Introduction.

What is Node.js. it is a JavaScript runtime environment that helps you too run JavaScript codes with out a browser. This helps to develop Desktop applications and Mobile applications etc.… Node.js uses V8 engine to execute JavaScript. Node.js uses asynchronous programming. This means it continues to run when i/o operation is run until the i/o request is satisfied. This is also known as i/o non-blocking messages.

Node.js is cable of creating dynamic page content, can handle file systems, can collect from data and can handle data in databases.

Basics of Node.js

The following code will explain how node js is used. Node.js is similar to JavaScript since it is JavaScript runtime.

If we need to create a file when some access a port.

This how its done.

The extension of Node files are also .js.

With node filename.js you can execute the node file.

In node.js we use

format to include modules to the project

To create modules the following format is used

And to include a custom module use “var variableName = require(‘./fileLocation’)”.

--

--