feat: HTTP panel on :8000 with first admin setup
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user