added api to generate ring handler with custom defroutes