fix routes and attempt to initialize app on deploy