Skip to content

Get Started

import { Steps, Tabs, TabItem, Aside } from ‘@astrojs/starlight/components’;

Ndigo targets Node.js ≥ 24 and pnpm ≥ 12. Make sure both are installed before continuing.

  1. Scaffold a new app

    Terminal window
    pnpm create ndigo-app my-app
    cd my-app

    The scaffold ships a minimal application with routing, a view, and a development server configured. See create-ndigo-app for options.

  2. Install dependencies

    Terminal window
    pnpm install
  3. Start the dev server

    Terminal window
    pnpm dev

    Open the printed URL in your browser. You should see the starter page.

  4. Add your first route

    Open src/app.ts (or the controller file the scaffold created) and add a route:

    import { routeMapping, ModelAndView } from '@ndigo/dispatcher';
    @routeMapping('/hello/:name')
    handleHello(name: string) {
    return new ModelAndView('hello', { name });
    }
  5. Create the view

    Add a view component that renders the model:

    import { WebComponentView } from '@ndigo/view-webcomponent';
    export class HelloView extends WebComponentView {
    constructor() { super('hello-view'); }
    }

    Register it in your application configuration and you’re done.

  • Read the Architecture overview to understand how context, routing, and views fit together.
  • Scaffold with the CLI instead: ndigo new my-app --kind node (see guide 37).
  • Browse the example apps for working patterns (auth, ORM, caching, real-time, and more).
  • Explore the API reference for package-level documentation.
EOF echo done