Skip to main content
Local development runs two processes side by side. The Base44 dev server handles your backend, and your usual frontend dev server runs the UI. Your frontend talks to the local backend through the SDK.

Prerequisites

If your project has backend functions, you need to install Deno to run them locally.

Configure your frontend client

If your project has a frontend that uses the SDK, you need to tell it where to send requests. By default, the SDK sends requests to Base44’s hosted backend. To use the local dev server instead, pass serverUrl to your client configuration when running in development mode. In production, omit serverUrl so the SDK uses its default. The approach is to detect whether your code is running in a development environment, then conditionally set serverUrl to point at the local dev server. Most frameworks provide a built-in way to check this.
1

Detect development mode

Use the pattern that matches your environment:
const isDev = import.meta.env.DEV;
2

Pass serverUrl conditionally

When creating the client, include serverUrl only in development:
import { createClient } from "@base44/sdk";

const base44 = createClient({
  appId: "your-app-id",
  ...(isDev && { serverUrl: "http://localhost:4400" }),
});
  • In development, isDev is true and the SDK sends requests to localhost:4400
  • In production builds, isDev is false, serverUrl is omitted, and the SDK uses the default Base44 backend

Run the dev servers

Each time you develop locally, you need two terminals running side by side.
1

Start the backend

In one terminal, run dev from your project directory:
base44 dev
This starts the local backend on http://localhost:4400.
2

Start the frontend

In a second terminal, start your frontend dev server as you normally would. For example, with Vite:
npm run dev
All SDK calls from your frontend now go to the local Base44 dev server.

See also