The other answer to your question there is why Flask is so good. One short file and you have a backend and a frontend!