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
+3 -2
View File
@@ -27,12 +27,13 @@ func main() {
// Create a gRPC server object
s := grpc.NewServer()
// Attach the Greeter service to the server
repository, err := services.NewRepository()
dbFilepath := config.GetDBFilepath()
repository, err := services.NewRepository(dbFilepath)
if err != nil {
panic(err)
}
storyFilepath := config.GetStoryFilePath()
storyFilepath := config.GetStoryFilepath()
storyService, err := story_service.NewStoryService(storyFilepath)
if err != nil {
log.Fatalln(err)