Follow the  realpython's flask tutorial.