Skip to main content
React Router v7 (and Remix) resource routes receive a Web Request and return a Response, so the core handler fits with no wrapper package.

Install

Resource route

Create app/routes/api.theauth.$.ts and register it with route("api/theauth/*", "routes/api.theauth.$.ts") in app/routes.ts. The request keeps its full path, so leave basePath at the default /api/theauth.
Export both loader (GET, HEAD) and action (POST, PUT, PATCH, DELETE). Build the handler once at module scope so an unsafe configuration fails at startup.

What was run

The handler contract (full path in, Response out and 404 outside the base path) is covered by packages/core/tests/http/fetch-mount.test.ts. This page did not run a React Router app.
Last modified on October 19, 2026