---
title: RELKIT_ROUTE_LEGACY_TRANSPORT
description: "Route sets its own method and path."
pagination: false
search:
  keywords: [RELKIT_ROUTE_LEGACY_TRANSPORT]
sidebar:
  icon: triangle-alert
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

**Route sets its own method and path.**

## What happened

A route passes `method` and `path` to `defineRoute`. Routes now take these from their file location and export name.

## What to do

Remove `method` and `path` from `defineRoute` and export it as GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS from `src/routes/**/route.ts`.

Reported by `@relkit/cli`, `relkit/diagnostics`.

See [all error codes](/docs/errors).
