# Routing

#### After creating routes directory

Every route.ts is taking path from directories names. If you created folder called routes and inside you'll create file route.ts it has path '/'. You can make for example folder 'user' inside routes folder and then inside create route.ts, path will be '/user'.

Every route must be in route.ts or route.js to be detected in loader function.

{% tabs %}
{% tab title="routes/route.ts" %}

```typescript
import type { ArcRequest, ArcResponse } from "@arcend/core";

const GET = async(req: ArcRequest, res: ArcResponse) =>
{
    return {
        path: req.path
    };
};
export { GET };

// {path: '/'}
```

{% endtab %}

{% tab title="routes/user/route.ts" %}

```typescript
import type { ArcRequest, ArcResponse } from "@arcend/core";

const POST = async(req: ArcRequest, res: ArcResponse) =>
{
    return {
        path: req.path
    };
};
export { POST };

// {path: '/user'}
```

{% endtab %}
{% endtabs %}
