Second commit

added few test, first api to add book
This commit is contained in:
2025-09-23 17:16:48 +02:00
parent 0457ca2011
commit 8432902df1
19 changed files with 298 additions and 123 deletions

View File

@@ -9,16 +9,15 @@ import (
)
type Config struct {
Port string `toml:"port" comment:"The port to listen on for the server."`
DemoDataPath string `toml:"demo_data_path" comment:"The path to the sql file to load for demo data."`
Port string `toml:"port" comment:"The port to listen on for the server."`
DatabaseFilePath string `toml:"database_file_path" comment:"Path to sqlite database file."`
DemoDataPath string `toml:"demo_data_path" comment:"The path to the sql file to load for demo data."`
}
func defaultConfig() Config {
return Config{Port: "8080", DemoDataPath: ""}
return Config{Port: "8080", DatabaseFilePath: "plm.db", DemoDataPath: ""}
}
func LoadConfig(configPath string) Config {
f, err := os.ReadFile(configPath)
if err != nil {