refactor services to use Interface and change name to app

This commit is contained in:
Robin Olsen
2026-02-22 16:16:09 +01:00
parent dbf619a054
commit 118e67dbf4
36 changed files with 247 additions and 219 deletions

View File

@@ -2,25 +2,13 @@ package main
import (
"context"
"fmt"
"os"
"github.com/LazyBachelor/LazyPM/internal/service"
"github.com/LazyBachelor/LazyPM/pkg/web"
)
func main() {
web := web.NewWeb()
config := service.Config{
WebAddress: "localhost:8080",
BeadsDBPath: "./.pm/db.db",
IssuePrefix: "pm",
StatisticsStoragePath: "./.pm/stats.json",
}
if err := web.Run(context.Background(), config); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
if err := web.NewWeb().Run(context.Background(), service.BaseConfig); err != nil {
return
}
}