repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

pico / pkg / apps / pipe
Eric Bower  ·  2025-07-04

config.go

 1package pipe
 2
 3import (
 4	"strings"
 5
 6	"github.com/picosh/pico/pkg/shared"
 7	"github.com/picosh/utils"
 8)
 9
10func NewConfigSite(service string) *shared.ConfigSite {
11	domain := utils.GetEnv("PIPE_DOMAIN", "pipe.pico.sh")
12	port := utils.GetEnv("PIPE_WEB_PORT", "3000")
13	dbURL := utils.GetEnv("DATABASE_URL", "")
14	protocol := utils.GetEnv("PIPE_PROTOCOL", "https")
15	withPipe := strings.ToLower(utils.GetEnv("PICO_PIPE_ENABLED", "true")) == "true"
16
17	return &shared.ConfigSite{
18		Domain:   domain,
19		Port:     port,
20		Protocol: protocol,
21		DbURL:    dbURL,
22		Logger:   shared.CreateLogger(service, withPipe),
23		Space:    "pipe",
24	}
25}