For example, if we run the following script which is not within an I/O cycle (i.e. the main module), the order in which the two timers are executed is non-deterministic, as it is bound by the performance of the process: [...]
However, if you move the two calls within an I/O cycle, the immediate callback is always executed first:
The view argument is a string that is the file path of the view file to render. This can be an absolute path, or a path relative to the views setting.
views
String or Array
A directory or an array of directories for the application's views. If an array, the views are looked up in the order they occur in the array.
default value: process.cwd() + '/views'
request({
agent: tunnelingAgent,
url: "https://2ip.ru/",
headers: { ... }
}, callback);