Explain Node.js web application architecture?

A web application distinguishes into 4 layers:

  • Client Layer: The Client layer contains web browsers, mobile browsers or applications which can make an HTTP request to the web server.
  • Server Layer: The Server layer contains the Web server which can intercept the request made by clients and pass them the response.
  • Business Layer: The business layer contains application server which is utilized by the web server to do required processing. This layer interacts with the data layer via database or some external programs.
  • Data Layer: The Data layer contains databases or any source of data.