How does nodejs request synchronize?

  node.js, question

Nodejs made the site,
When requesting api data, you need to request twice (the second time uses the data requested for the first time)
Then in render view;
How can I synchronize?
In addition, the library request-promise was found on the Internet.
But I still use asynchronous.

Is there any solution? I don’t know how to insert the code for the first time. . .

Different promise implementations are different, and the calling methods are also different.
To view the viewer API description
This may be called ~

var promise=new Promise(....);
 return new Promise(....);
 return new Promise(....);
 //Last Logic
 //Same exception handling