I don't really think this needs to be abstracted, it being only used once. I'd be OK with it being inline.
Then abstract it in the app object.