Two flask Apps same domain IIS
been stuck for a week before asking this question and the neatest way I found was to assign each app a different app pool and now they are working together side by side happily ever after.
I want to deploy same flask application as two different instances lets say sandbox instance and testing instance on the same iis server and same machine. having two folders with different configurations (one for testing and one for sandbox) IIS runs whichever is requested first. for example I want to deploy one under www.example.com/test and the other under www.example.com/sandbox. if I requested www.example.com/test first then this app keeps working correctly but whenever I request www.example.com/sandbox it returns 404 and vice versa! 
question bottom line: 

how can I make both apps run under the same domain with such URLs?
would using app factory pattern solve this issue?
what blocks both apps from running side by side as I am trying to do?

thanks a lot in advance