integrating Flask into index