# Framework M Configuration Example
# 
# This file demonstrates [dev] section configuration for `m dev` command.
# Place this file as `m.toml` in your project root.

[database]
url = "postgresql://localhost:5432/myapp_dev"
pool_size = 5
echo = true

[dev]
# Override default ports
backend_port = 8888
frontend_port = 5173

# Enable optional processes
enable_worker = true

# Override default commands (optional)
# backend_command = "uvicorn app:app --reload --port 8888 --log-level debug"
# frontend_command = "pnpm dev --port 5173 --host 0.0.0.0"

# Use a custom Procfile (optional)
# procfile = "Procfile.dev"

# Define custom processes
[dev.processes.mailhog]
command = "mailhog -smtp-bind-addr 127.0.0.1:1025 -ui-bind-addr 127.0.0.1:8025"
enabled = false  # Set to true to enable

[dev.processes.redis]
command = "redis-server --port 6379"
enabled = false

[dev.processes.migration_watch]
command = "python scripts/watch_migrations.py"
cwd = "."
enabled = false
env = { PYTHONPATH = "src" }

# Production configuration
[production]
workers = 4
max_requests = 1000
timeout = 30

# Co-coding configuration for `m dev-link`
[dev-link]
# Only link specific packages (optional)
# include = ["framework-m-core", "ui"]

# Explicitly exclude packages (optional)
# framework-mx-mongo is excluded by default
exclude = ["framework-mx-mongo", "studio"]
