SIGN IN

9. Node.js Lessons. Events, EventEmitter and Memory Leaks

The next object we are interested in is EventEmitter, or, as it is sometimes called, EE. EventEmitter is a basic object that executes work with events in Node.js. A great number of other built-in objects generating events inherit from it. To use EventEmitter you only need to connect the built-in “events” module and take a respective property from it (let us create ee.js);

Category: Programming
0

8. Node.js Lessons. Inheritance from Errors, Error

Inheritance of a built object from Error is quite different in Node.js. Here is an example that will help me to explain you first why we may need this thing, and then – how we should do it correctly.

Category: Programming
0

Happy Programmer’s Day!

We are looking forward to meeting you on our website soshace.com

Category: Programming
0

7. Node.js. Lessons. Console Module.

Now let us talk on another built-in module named console. As far as we know, it uses util.format and util.inspect for activation. Console, unlike util, is a global variable. It is almost an exception for Node.js, but the fact is that we don’t have to require this сonsole. It is simply everywhere.

Category: Programming
0

6. Node.js. Lessons. Util and Inheritance

Hey all! Our upcoming articles will be devoted to the most frequently used Node.js modules. The first method that we will study is the util inspect of a module built in util. This method enables you to beautifully derive any object, even if this object – as it is shown in our example – has a link to itself.

Category: Programming
0

5. Node.js. Lessons. Global modules.

The next NPM opportunity that we will study with you is global modules. Every module can be globally installed using a –g flag: npm –g i express. As you can see, we cannot make it done for the reason that ‘globally’ means ‘into the system directory.’

Category: Programming
0

4. Node.js. Lessons. NPM Package Structure

Let us continue our conversation about NPM. To look at a real package.json install an express module. Enter in the console: npm i express@3.0 We will use this module later, but now we just install this outside module and take a look at its package.json. We are going to find out a lot of interesting things there. Here I will comment on several lines of this file. We will learn some basic characteristics of package.json, some general information this time. Later, when we start developing something particular, we will use it in our solutions. So, our fields…

Category: Programming
0

3. Node.js Lessons. Package Manager for Node.js

This article is devoted to NPM – a package manager for Node.JS. NPM goes with a standard Node installation. If you’ve already installed Node, it means that NPM is installed on your PC, too. This module, on top of everything else, contains a console utility that gives a handy access to a giant database of modules supported by the community.

Category: Programming
0

2. Node.js Lessons. Modules Part 2

Let us start our lesson with understanding what a module object is. It contains a great variety of important properties, which will be needed in more complex and complicated behavior scenarios. You can download the source code from here. An object called ‘module’ is a variable that exists in every module.

Category: Programming
0

1. Node.js Lessons. Modules.

Let us create your first project with Node.js. Our primary aim will be to get familiar with modules – the way offered by Node to organize your project.

Category: Programming
0

Sign in

Forgot password?

Or use a social network account

 

By Signing In \ Signing Up, you agree to our privacy policy

Password recovery

You can also try to

Or use a social network account

 

By Signing In \ Signing Up, you agree to our privacy policy