I have a view, that actually is rendering only after an axios request finish, but I need to render the view first, and when the request is ready, I pass the parameter to the view.
Actually:
app.get('/', function(req, res){
axios.get('example.com')
.then(function(response) {
res.render('routes/site/index', {ctx: response});
});
});
What I need:
The view loading before the request, and after the request ready, only pass the parameter to the same view that was already loaded.