add db filepath

This commit is contained in:
2025-06-14 21:40:38 +07:00
parent 3a2980e9d0
commit 54706f0aba
6 changed files with 23 additions and 8 deletions
+9 -1
View File
@@ -2,10 +2,18 @@ package config
import "os"
func GetStoryFilePath() string {
func GetStoryFilepath() string {
storyFilename := os.Getenv("STORY_FILENAME")
if storyFilename != "" {
return storyFilename
}
return "./data/story/story.json"
}
func GetDBFilepath() string {
storyFilename := os.Getenv("DB_FILENAME")
if storyFilename != "" {
return storyFilename
}
return "data/db/store.db"
}