set up the index with an app and controller.