Load (config/config.go)

tma1 · server/internal/config/config.go · go · Apache-2.0
ai

Loads application configuration from environment variables with sensible defaults.

// Source: https://github.com/tma1-ai/tma1 | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package config

import (
	"fmt"
	"os"
	"path/filepath"
	"strconv"
)

// Pinned to an exact tag so every install runs the version TMA1 was tested
// against; "latest" only applies the minRequiredVersion floor. Mirrored in
// site/public/install.sh.
const defaultGreptimeDBVersion = "v1.3.0"

// Config holds all runtime configuration for tma1-server.
type Config struct {
	// Host is the address tma1-server binds to (default 127.0.0.1).
	Host string

	// Port tma1-server listens on.
	Port string

	// DataDir is where GreptimeDB binary and data are stored (~/.tma1).
	DataDir string

	// GreptimeD

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key