Javascript and flask set up