It is now very popular to develop front-end and back-end separation. When searching on the Internet, some of them use nodejs to request other back-end apis and then render the page, that is, node is used as the middle layer. Another method is a pure html page, and all interfaces use ajax to asynchronously request data. Isn't the latter more convenient? Why use node as the middle layer?
You can take a look at my previous answer
/q/10...
The use of the template engine is to reduce requests and to separate the front and back ends, so in this way, the three-tier architecture is suitable for large applications
The back-end interface is business-driven and does not customize the interface according to the front-end page. When the front-end engineer writes the code, the data that can be requested through one interface often requires multiple interfaces to piece together the data