Simplify server code, make it always return full ember app

Why would you move this function here? Isn't it better to have it extracted?