Skip to content

Start-MockServerWithData.ps1

Quick reference for the server startup script.

Location

This script is in the project root for convenience.

Usage

# From project root
.\Start-MockServerWithData.ps1                    # Start with basic data (auto-generate if missing)
.\Start-MockServerWithData.ps1 -Force             # Regenerate basic data and start
.\Start-MockServerWithData.ps1 -DataSet Medium    # Use medium dataset
.\Start-MockServerWithData.ps1 -DataPath "R:/MockData"  # Custom data path

What It Does

  1. Detects current git branch
  2. Reads .branch-config.json for port and data path settings
  3. Checks if mock data exists
  4. Generates mock data if missing (calls Scripts/data-generation/Generate-BasicMockData.ps1 or Scripts/data-generation/Generate-MediumMockData.ps1)
  5. Sets environment variables (CESIVI_DATA_PATH, CESIVI_HTTP_PORT, etc.)
  6. Starts the server with dotnet run

Documentation

See GENERATE_DATA_GUIDE.md for complete documentation on data generation and server startup.