Development Server Configuration
Development server configuration in Azu CLI manages the development environment, including hot reloading, file watching, debugging options, and development-specific settings. This enables fast development cycles with automatic rebuilding and reloading.
Overview
The development server provides:
Hot Reloading: Automatic rebuild and restart on file changes
File Watching: Monitor source files for changes
Live Reloading: Browser refresh on template changes
Debug Mode: Enhanced debugging capabilities
Development Tools: Built-in development utilities
Development Server Configuration Structure
Base Development Configuration
# config/development.yml
development:
# Server settings
server:
host: <%= ENV["AZU_HOST"] || "localhost" %>
port: <%= ENV["AZU_PORT"] || 4000 %>
workers: 1
backlog: 1024
# Hot reloading
hot_reload:
enabled: true
rebuild_on_change: true
restart_on_change: true
browser_reload: true
# File watching
file_watcher:
enabled: true
watch_paths:
- src/
- config/
- public/templates/
ignored_paths:
- .git/
- node_modules/
- .crystal/
- bin/
- tmp/
- log/
ignored_extensions:
- .tmp
- .swp
- .swo
# Compilation
compilation:
incremental: true
parallel: true
cache_dir: .crystal/
debug: true
warnings: true
# Debugging
debugging:
enabled: true
port: 5005
suspend: false
log_level: debug
# Development tools
tools:
inspector: true
profiler: true
memory_tracker: true
performance_monitor: trueServer Configuration
Basic Server Settings
Advanced Server Settings
Hot Reloading Configuration
Hot Reload Settings
Hot Reload Implementation
File Watching Configuration
File Watcher Settings
File Watcher Implementation
Compilation Configuration
Compilation Settings
Compiler Implementation
Debugging Configuration
Debug Settings
Debug Implementation
Development Tools Configuration
Development Tools
Environment-Specific Configuration
Development Environment
Test Environment
Development Server Commands
Server Management Commands
Development Tools Commands
Environment Variables
Development Environment Variables
Best Practices
Development Workflow
Hot Reloading: Enable hot reloading for fast development cycles
File Watching: Configure appropriate watch paths and ignored paths
Incremental Compilation: Use incremental compilation for faster builds
Debug Mode: Enable debug mode during development
Development Tools: Use built-in development tools for debugging
Performance
Watch Paths: Limit watch paths to necessary directories
Ignored Paths: Exclude unnecessary directories from watching
Debouncing: Use appropriate debounce times for file changes
Compilation Cache: Enable compilation caching
Parallel Compilation: Use parallel compilation when possible
Debugging
Debug Mode: Enable debug mode for detailed error information
Profiling: Use profiling tools to identify performance bottlenecks
Memory Tracking: Monitor memory usage during development
Logging: Use appropriate log levels for debugging
Error Handling: Implement proper error handling and reporting
Related Documentation
Configuration Overview - General configuration guide
Project Configuration - Project-specific configuration
Database Configuration - Database configuration
Generator Configuration - Code generation configuration
Environment Variables - Environment variable reference
Last updated