Share On: Twitter Facebook Google+ LinkedIn Pinterest Tumblr Reddit

What Is Express In Node.js

Tags: Node.js Express

explaining node.js

Hello in this article, I will share the information about the express module in node.js which is one of the most important and popular frameworks used with Node.js and how we can use it.

Firstly, what is node.js? It is a Javascript Runtime platform started to be developed by Joyent in 2009, where we can write server-side applications with Javascript. It runs on a javascript engine called V8. V8 is vastly coded by C, C ++ and javascript languages ​​developed by Google and which Chrome web browsers also work on. Its sole purpose is to translate javascript code into machine code. It is definitely a very good performance. I created multiple events that run asynchronously and tested them myself. Their response speeds were incredible. Node.js, which runs I / O and network operations non-blocking, is very stingy in time and resources. In other words, if you want to give an example, instant transactions in very high traffic sites can be sent to the client's screen in a very short time and with less resource consumption, using the web socket, as in the same signalR, without querying the user. For example, sending stock exchange information withdrawn from a service to all clients. This will be done as the stock market information changes without querying the user. Real time applications can be done with node.js using web socket technology.

Now let's give some examples from around the world. One of the popular companies that switched to Node.js is Linkedin. It was using Rails before switching to Node.js on the mobile server side. After switching to Node.js, server cost decreased by 1/10. Some operations have increased speed of up to 20 times. I think the best example is Paypal. It's more recent. In order not to risk the Paypal working platform, instead of directly switching to Node.js, it developed parallel development in 2 platforms as Java and Node.js. As a result, Node.js met 2 times more requests per second than the java application. Moreover, while Node.js runs on a single core processor, the java application runs on a five-core processor. In other words, Node.js has reduced the cost to 1/5. In addition, response time is 35% faster.

What is node.js
Node.js can be easily downloaded from https://nodejs.org/ as follows.

What is express?

After learning what node.js is, we can understand what express is in node.js. Express module is a template framework written for Node.js. It makes our work easier due to its structure and useful methods.It provides us convenience in GET, POST, DELETE operations and Routing operations and many other operations. In general, while writing the server side with Node.js, development is made with express.

Express framework explaining
The Express.js module / package is a Node.js based web application server framework.

Why should we use Express?

  • It provides management of web requests with the route method it offers.
  • MySQL, MongoDB, SQL SERVER etc. makes it easy to develop database applications.
  • Provides easy and fast development of web applications.
  • Provides faster application development with various middleware modules.
  • It enables to create REST API for different applications.
  • It facilitates the management of static files.
  • Pug, Vash, EJS, Handlebars etc. supports template engines.

As a result, in this article we learned what is express in node.js. If you want to learn how to install express and how to make a website with express, you should look at How To Create New Node.js Project article.

Comments(0)