about summary refs log tree commit diff stats
path: root/internal/server/server.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-07 14:21:22 +0200
committerAlan Pearce2024-05-07 14:21:22 +0200
commitf272e269787f0db46d8f90c7ec2cd37e6d4e299a (patch)
treef2847f2a7e96a8ccba05005b6a6a527f5b935f45 /internal/server/server.go
parent9b24b805b45c71bb54dacc1112380357050f48af (diff)
downloadsearchix-f272e269787f0db46d8f90c7ec2cd37e6d4e299a.tar.lz
searchix-f272e269787f0db46d8f90c7ec2cd37e6d4e299a.tar.zst
searchix-f272e269787f0db46d8f90c7ec2cd37e6d4e299a.zip
refactor: make data path (partially) configurable
Diffstat (limited to 'internal/server/server.go')
-rw-r--r--internal/server/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index 76fbecb..db93092 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -183,7 +183,7 @@ func New(runtimeConfig *Config) (*Server, error) {
 	})
 
 	var nixosOptions = options.NixOptions{}
-	jsonFile, err := os.ReadFile(path.Join("data", "test.json"))
+	jsonFile, err := os.ReadFile(path.Join(config.DataPath, "test.json"))
 	if err != nil {
 		slog.Error(fmt.Sprintf("error reading json file: %v", err))
 	}