# Set up a basic gateway - Editor

<WizardSteps build="gateway" method="local" step="setup-a-basic-gateway" />

<MethodTabs build="gateway" method="local" step="setup-a-basic-gateway" />

In this tutorial we'll set up a simple gateway using Zuplo's local development,
powered by the [Zuplo CLI](../../../cli/overview.mdx). We'll use the default
project template, which ships with a working todo API.

## Requirements

- [Node.js](https://nodejs.org/en/download) 24.0.0 or higher

## Create and test your gateway

<Stepper>

1. **Create your project**

   Create a new project with
   [create-zuplo-api](../../../cli/create-zuplo-api.mdx):

   ```bash
   npx create-zuplo-api@latest
   ```

   The CLI walks you through a few prompts. First, name your project:

   ```bash
   ✔ What is your project named? … example-project
   ```

   Next, the CLI offers to create a matching project on the Zuplo Portal. Answer
   **Yes** — this opens your browser to sign in (or create a free account) and
   creates a Zuplo project to pair with your local one. If you already have an
   account, you'll be asked which one to use.

   ```bash
   ? Create a matching project on portal.zuplo.com? › No / Yes
   ```

   Creating the matching project automatically **links** your local project to
   Zuplo, so features like API keys work in later steps without any extra setup.

   Finally, select any AI coding agents you'd like to configure, or choose
   **None**:

   ```bash
   ? Which AI coding agents would you like to configure? › - Space to select. Return to submit
   ◯   Claude Code - CLAUDE.md, .claude/, .mcp.json
   ◯   GitHub Copilot
   ◯   Cursor
   ◯   Windsurf
   ◯   OpenAI Codex
   ◯   None
   ```

1. **Start your local gateway**

   Change into your new project directory and start the development server:

   ```bash
   cd example-project
   npm run dev
   ```

   The terminal prints links to your local gateway, Route Designer, and a local
   Docs Server:

   ```bash
   Started local development setup
   Ctrl+C to exit

   🚀 Zuplo Gateway: http://localhost:9000
   📘 Route Designer: http://localhost:9100
   📄 Docs Server: http://localhost:9200
   ⚙️  Loaded env files:
       - .env.zuplo
   ```

1. **Explore your API**

   The default template ships with a working **todo API** — four routes
   (`GET /todos`, `POST /todos`, `PUT /todos/{id}`, `DELETE /todos/{id}`)
   defined in `config/routes.oas.json`.

   Open the
   [local Route Designer](../../../articles/local-development-routes-designer.mdx)
   at http://localhost:9100 — you can also click the link printed in the
   terminal — to see the routes. Select **Get all todos** to inspect how it's
   configured; you can change the path, method, request handler, and add
   policies from here.

1. **Test the API**

   Test the **Get all todos** route by clicking the **Test** button next to the
   **Path** field in the Route Designer.

   You can also call it directly with your favorite HTTP client (for example
   Postman, HTTPie, or curl):

   ```bash
   curl http://localhost:9000/todos
   ```

   You should receive a `200 OK` response with a JSON list of todos. Your
   gateway is now serving traffic locally.

</Stepper>

<TutorialPager build="gateway" method="local" step="setup-a-basic-gateway" />
