feat: HTTP panel on :8000 with first admin setup

This commit is contained in:
orohi
2026-06-17 04:40:34 +03:00
parent f214aaa48b
commit 0f31c24bf9
14 changed files with 502 additions and 5 deletions
+11 -1
View File
@@ -7,6 +7,7 @@ import (
type Config struct {
DatabaseURL string
HTTPPort string
}
func Load() (*Config, error) {
@@ -14,5 +15,14 @@ func Load() (*Config, error) {
if url == "" {
return nil, fmt.Errorf("DATABASE_URL is required")
}
return &Config{DatabaseURL: url}, nil
port := os.Getenv("HTTP_PORT")
if port == "" {
port = "8000"
}
return &Config{
DatabaseURL: url,
HTTPPort: port,
}, nil
}