starts flask in main