register middleware routes without listening