javascript - How to request the API interface to get data in node?
欧阳克2017-06-13 09:23:57
0
2
894
I want to request the interface data in nodeJs and then render it with ejs, so that when the browser requests it, the front-end page will be the rendered page. How to do this? (This seems to be a step towards separating the front and back ends)
Using the EJS template engine does not require requesting the interface, it is directly rendered, and the backend directly transmits the output
Use node to request the interface? superagent