How to Use node to Forward Requests and Render Pages

  node.js, question

The company has an old project, which is done with jsp, and then the initial data of each page needs to be brought back by request and rendered with js. It is too troublesome. The supervisor wants to do it with node now, mainly forwarding http to the original java background with node, and returning the data to the page by node after obtaining the data.

For example, the page request’ /action’ interface is forwarded to java side by routing in node.
Now the request is ready to be forwarded, but what about the initial data on the page?

Howres.renderBefore requesting the corresponding java interface through node, obtaining the data and filling it into the template? I just learned node and express, but I can’t get around it._(:3」∠)_

You can get the interface data through node’s http module, and then bind json data to res.render