Migrated db, fixed the routes and api main page