Image for post
Image for post
https://npmjs.com

After a long pause welcome back to my new article.

I’m going to explain about NPM package manager and show some useful/helpful things which provide npm.

In this article we will cover the following topics

  • What is NPM?
  • How to publish own library to NPM
  • How to maintain big projects using NPM
  • Alternative package managers

What is NPM?

NPM is a package manager for JavaScript programming language. It is the default package manager for the JavaScript runtime environment Node.js. It consists of a command line client, also called npm, and an online database of public and paid-for private packages, called the npm registry…


Image for post
Image for post

One of the most popular and used library for front-end development is React.
Many of beginners starting learn React after some knowledge about HTML, CSS and JS. But mostly they have many questions about project structure, about libraries which they need to use with React App, and mainly they are getting tangled up. And most probably, most of them not know how to organize team work correctly.

In this series of Organizing React Application, I want to show, how you can organize your React App structure, also which libraries you need to use for application and for development process(also for…


Image for post
Image for post

One of the most important parts in server side development is to keep servers in a stable condition and not allow overloading operations happen as they can crash the servers.

In this article I will explain what “Health Checks” and “Overload Protection” is, also I will show solutions for some problems and some guidelines on how to do that.

Imagine you have 3 Node servers balanced with “Nginx” server, the load of your servers is divided equally, so if you have 600 users, then every server has 200 clients. But dividing equally does not mean that you are protected from…


Image for post
Image for post

Hi, in this article I am going to represent you async-iteration feature and how it can work with file system and http server which send the data chunk by chunk to the client and makes the performance way better than sending all the data at once.

NodeJS v10 released asyncIterator in Experimental mode which means this feature is still under development and latter can be changed.

Asynchronous Iterators is a proposal to TC39 community which already implemented in Chakra, JavaScriptCore, SpiderMonkey and V8 cores.

As we know for iteration, JavaScript has for-of loop which iterates over the iterable object which…


Image for post
Image for post

In this article, I am going to show you how to do a graceful shutdown in NodeJS application, but first, let's describe what does “graceful shutdown” means and why we need to do that in our application and what are the benefits.

Graceful shutdown

Let’s imagine you have an HTTP server with NodeJS which connected to a database, and every time server gets called then it sends a request to the database to get/set a data which also will send to the client by the response. …


Image for post
Image for post

React is one of the biggest JavaScript libraries for building user interfaces provided by Facebook and React-Native framework lets you to build native mobile apps which uses the same design as React library. One of the amazing fact about React-Native is that it’s not only about building Native IOS/Android apps but we can also build web applications using the same code and share more than 50% codes between React-Native(Mobile) and React(Web) because we are using React and JavaScript in both cases.

Sounds good, right?

So let’s understand the general parts which can’t be shared between React and React-Native.

  1. I think…


Image for post
Image for post

In this article I am going to show how to balance NodeJS server using Nginx and after that I am going to show how to automatically balance the same server using Nginx Plus.

This article is not for beginners because I will not explain how to create NodeJS server from scratch and I will not explain about Nginx and comparing it with NodeJS cluster in this article.

Basic NodeJS server

Run server using

node server.js 3000

Open http://localhost:3000/

So using argv we can easy run multiple server in difference ports.

Nginx server

As my upstream have two servers I need to run second…


Image for post
Image for post

Mostly Front-end developers who are listening Reactive word the first time they confuse it with React library. Actually, it’s completely different.

Today I am going to explain about Reactive Programming and how to do it in JavaScript.

This article doesn’t go deep, it will help you to imagine the basic concepts of Reactive Programming and will help to find more good topics related to this article.

Before going to understand Reactive Programming, I would like to tell you about Imperative Programming.

What is Imperative Programming?

Imperative Programming is a programming paradigm that uses statements that change a program’s state.

Example of Imperative Programming

Nairi Harutyunyan

Full Stack JS Ninja, Writer who interested in "distributed systems" and "microservices" and who is big fun of Reactive programming.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store