This is a resource function created for hapi.js in order to in order to reduce the amount of boilerplate code when writing hapi routes.