I am creating App integrating two systems. Therefore, I am using some requests and async functions. It\'s no problem to call async function in async function. However, I nee
Since the main scope is not async
, you will need to do an async anonymous function that calls your function and itself :
(async function() {
await yourFunction();
})();
Or resolve the promise :
yourFunction().then(result => {
// ...
}).catch(error => {
// if you have an error
})
Hope it helps,
Best regards