Compare commits

...

1 Commits

Author SHA1 Message Date
Bohan Jiang
6c102db69c Revert "fix(daemon): normalize hostname by stripping .local mDNS suffix (#1070)"
This reverts commit 6428a10046.
2026-04-17 00:34:50 +08:00
2 changed files with 2 additions and 8 deletions

View File

@@ -105,7 +105,7 @@ start:
@echo "Frontend: http://localhost:$(FRONTEND_PORT)"
@bash scripts/ensure-postgres.sh "$(ENV_FILE)"
@echo "Running migrations..."
@cd server && go run ./cmd/migrate up
cd server && go run ./cmd/migrate up
@echo "Starting backend and frontend..."
@trap 'kill 0' EXIT; \
(cd server && go run ./cmd/server) & \

View File

@@ -147,13 +147,7 @@ func LoadConfig(overrides Overrides) (Config, error) {
// Host info
host, err := os.Hostname()
if err != nil {
host = ""
}
// Normalize mDNS suffix so daemons started via different methods
// (e.g. CLI vs desktop app) always register under the same hostname.
host = strings.TrimSuffix(host, ".local")
if strings.TrimSpace(host) == "" {
if err != nil || strings.TrimSpace(host) == "" {
host = "local-machine"
}