Node as the middle layer of the project structure analysis for guidance (personal more vague)

  node.js, question

The module required by the project is unclear! I will use the classic framework of angular and node to blur the project structure and npm packages.

Node is the middle layer, similar to the separation of front and back ends of php+java. My personal understanding is as follows:

1. nginx (access layer)-> load balancing -> node (middle layer) ->REST/RPC->java (business layer);
2. node, as the middle layer, is also an independent mvc website in essence, which is responsible for receiving requests and rendering web pages. Only part of the business logic is no longer completed by node itself, but can call the application server of background JAVA through REST or RPC.
3. So when you talk about the project module here, I understand that you mean the dependency of node_module inside, which should be no different from the common node website (such as Mean architecture).

To give you two references, I recently read the sleep well written: