I have a nodejs application where i want to make connection with elasticsearch and other database like mongodb and then create server but i don't want to use callback functions . is there any way to hold execution of nodejs code while function is establishing connections with ES cluster.
function loadConfFile(){
}
/* wait for above to complete */
function createESConnection(){
}
/* wait for above to complete */
function createMongoDBConnection(){
}
const express = require('express');
/* and so on */