questionnaire docs
Getting Started

Getting Started

Install dependencies, seed the database, and run the main app and docs site locally.

Getting Started

Prerequisites

  • Node.js 22+
  • MongoDB running locally or a remote MONGODB_URI
  • npm

Install the main app

From the repository root:

npm install

Environment variables

Create a .env file in the project root:

# .env file
MONGODB_URI=mongodb://localhost:27017/questionnaire
DEV_TENANT_DOMAIN=getbestanswers.com
DEV_TENANT_ID=<optional_tenant_id>

On localhost, proxy.js resolves the tenant using DEV_TENANT_DOMAIN.

Seed data

npm run seed
npm run seed:articleHome

Run locally

# Terminal 1 — main app
npm run dev
# → http://localhost:3000

# Terminal 2 — docs site (local only)
npm run docs:dev
# → http://localhost:3001/docs

Production build (main app only)

npm run build
npm start

The docs app is not deployed. It is excluded from the Docker image via .dockerignore.

Next steps

On this page