How to setup flask.py in IIS properly?

Hi All,

In 1 MS Windows IIS, I created a sites (DEV) and setup flask.py for other machines to connect with it via API calls. However, when I create a separate site (PRD) in the same IIS but with different port, clone everything as well. It was found that the API calls to the PRD site and DEV site does not work properly and become very unstable (some changes are in codes are not effective). If I stop one of the sites, just keep one up and restart the server, it works. Seems the issue was related to the caching of flask.py and IIS.
Just wonder if anyone got the experience in setup 2 IIS sites with flasks.py and same set of codes in different folders, any tips to make it work properly?
Many thanks in advance!

Thanks!!! ~David