evidence dev command starts a local development server with hot module reloading for building Evidence projects.
Syntax
Description
This command launches the Evidence development environment, which:- Starts a Vite development server on port 3000
- Watches for file changes in your project
- Provides hot module reloading for instant updates
- Syncs files from your project to the
.evidence/templatedirectory - Loads environment variables from
.envfiles - Automatically increases Node.js memory limit to 4096MB
Options
Enables verbose console logs for debugging. When enabled, detailed logging information is printed to the console.
File Watching
The dev server automatically watches and syncs the following directories:pages/- Markdown pagesstatic/- Static files (images, etc.)sources/- Source configuration filesqueries/- SQL query filescomponents/- Custom Svelte componentspartials/- Reusable content partialsapp.css- Custom theme file
Usage Examples
Start the development server
http://localhost:3000.
Start with debug logging
Environment Variables
The dev command respects the following environment variables:EVIDENCE_DATA_DIR- Directory for data files (default:./static/data)EVIDENCE_DATA_URL_PREFIX- URL prefix for data files (default:static/data)NODE_OPTIONS- Node.js options (automatically set if not present)
Exit Codes
0- Server started successfully- Non-zero - Error occurred during startup
Warnings
If no source manifest is found at.evidence/template/static/data/manifest.json, you’ll see:
evidence sources to generate the required data files.
Related Commands
- evidence build - Build production outputs
- evidence sources - Generate data from source queries
- evidence preview - Preview the production build