(async () =>{ console.log( getAllCoordinates('route2')) //var polyline = L.polyline(newArray, {color: 'red'}).addTo(map); //map.fitBounds(polyline.getBounds()); //connectDB('route2') })();