Skip to Content
DocumentationBackendLocal Development

Local Development

Use these steps to run be-howden locally.

Prerequisites

  • Node.js v20.x
  • Yarn 1.x
  • Docker and Docker Compose

Setup

  1. Go to the backend directory.

    cd be-howden
  2. Install dependencies.

    yarn install
  3. Create or update the local .env file in the be-howden root.

    The app reads environment variables from .env. For the local Docker database, use these database values:

    NODE_ENV=development PORT=8000 POSTGRES_DB=behowden // replace with actual value POSTGRES_PORT=5550 POSTGRES_HOST=localhost POSTGRES_USERNAME=howden // replace with actual value POSTGRES_PASSWORD=howden@2023! // replace with actual value POSTGRES_SYNC=true // set true to sync migration to database POSTGRES_SSL=false DEV_FRONTEND_URL=http://localhost:3000

    Keep the other required secrets from your existing local .env, such as JWT, SMTP, Google, Stripe, Mandrill, and AWS values.

  4. Start the local Postgres and pgAdmin containers.

    docker-compose up -d
  5. Start the backend in development mode.

    yarn dev
  6. Confirm the server is running.

    The API listens on:

    http://localhost:8000

Useful Local Services

  • API: http://localhost:8000
  • Postgres: localhost:5550
  • pgAdmin: http://localhost:8082

The pgAdmin credentials are defined in docker-compose.yml.

Stop Local Services

Stop the backend process with Ctrl+C, then stop the Docker containers:

docker-compose down
Last updated on