Overview
This example demonstrates how to configure envcheck for a typical Node.js application. It validates Node.js and npm versions, required environment variables, port availability, and essential project files.Configuration
.envcheck.yaml
What This Checks
Tools
- node >=18.0.0: Ensures you’re running a modern LTS version of Node.js with the latest features and security patches
- npm >=9.0.0: Validates you have a compatible npm version with improved workspace support
- git: Confirms git is installed for version control operations
Environment Variables
- NODE_ENV (optional): Standard Node.js environment variable for development/production modes
- DATABASE_URL (required): Connection string for database access - critical for application functionality
Ports
- 3000: Default development server port for most Node.js frameworks (Express, Next.js, etc.)
- 5432: PostgreSQL database port - ensures no conflicts with local database
Files
- .env: Local environment configuration file must exist
- package.json: Project manifest is required for dependency management
Expected Output
Tips for Node.js Projects
For monorepo setups with multiple Node.js services, create separate
.envcheck.yaml files in each package directory with service-specific configurations.Common Variations
TypeScript Projects
Add TypeScript compiler checks:Next.js Applications
Check for Next.js-specific requirements:Microservices
Validate additional service dependencies:Learn More
- Tools Validator - Version constraints and tool detection
- Environment Variables - Pattern matching and validation
- Port Checker - Port availability testing
- File Validator - Path and permission checks
