January 30, 2019

A small introduction on Node Js

Node js is a runtime environment for javascript

Node js is c++ program that uses chrome v8 engine

Node js continously monitors EventQueue in the background,
EventQueue helps single thread to perform multiple request async

Node are mainly used on data intensive application not on cpu intensive application
as single thread is used.

How do I resolve “Cannot find module” error using Node.js?

Instead of window object we use global object in node, through which we can access all global objects

In node js every file is a module and the variable inside that scope to that module

If you want to export a function outside the module, you have to use module.export function
to consume it we use require() function
use const instead var for require()

In a module either you can export an object or a single function

User node js we can retrieve the information about operating system and file, which was not possible while using Java script

Always prefer async methods while working with node js

Use jshint tool to know the error

In ECMAScript25 we can concatenate two string with out using + operator you can use ` instead

Facebook comments