Skip to main content

Overview

The Refine SDK works in server-side environments including Node.js, serverless functions (AWS Lambda, Vercel), and SSR frameworks (Next.js, Nuxt).

Server Configuration

Key differences from client-side:

Next.js

Server Components (App Router)

API Routes

getServerSideProps (Pages Router)

Client-Side Hydration

Server-render search results, then hydrate for interactivity:

AWS Lambda

Vercel Edge Functions

Identity on Server

On the server, you need to manage identity explicitly:

Caching Recommendations

Cache recommendations for performance:

Error Handling on Server

Testing

Mock the SDK for tests:

Next Steps

React Integration

Client-side React patterns

Error Handling

Handle server-side errors