> For the complete documentation index, see [llms.txt](https://docs.appear.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appear.sh/installation/sdk-installations/redwood-js-and-vercel.md).

# Redwood JS & Vercel

{% stepper %}
{% step %}

### Install using your favourite package manager

```bash
npm i @appear.sh/introspector // or
yarn add @appear.sh/introspector // or
pnpm add @appear.sh/introspector
```

{% endstep %}

{% step %}

### Create instantiation file for Appear

Create a file where you can instantiate Appear, for example: `api/src/withAppear.ts`

```typescript
/// withAppear.ts
import { createVercelMiddleware } from "@appear.sh/introspector/integrations/redwoodjs"

export const withAppear = createVercelMiddleware({
  // api key you can obtain at https://app.appear.sh/settings
  apiKey: "your-api-key",
  // any identifier of environment you prefer, we recommend separating production/staging/development. The more granular the better
  environment: process.env.NODE_ENV ?? "development",
  // other config as you desire
  // ...
})
```

{% endstep %}

{% step %}

### Wrap your Serverless Functions&#x20;

Wrap your Serverless Functions (API Endpoints) in `withAppear`

```typescript
// eg. api/src/functions/<function name>/<function name>.ts
import { withAppear } from "src/withAppear"

export const handler = withAppear(async (event, context) => {
  // your code
})
```

{% endstep %}

{% step %}

### Log into Appear to view entries

The introspector will begin reporting the structure of your API services when they're interacted with. Log into [Appear](broken://spaces/k1FE7BkpojojQWs9RfaQ/pages/fgXrRYhHPH6UqaisimYD) with your credentials to view the services that appear. You may need to refresh the page periodically.
{% endstep %}
{% endstepper %}

***

If you have any queries or require support with the above instructions, please [get in touch](/getting-started/get-in-touch.md) with us.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.appear.sh/installation/sdk-installations/redwood-js-and-vercel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
