refactor services to use Interface and change name to app
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user