forked from mtusi2026/mtusi2026lab4
feat(app) implemented lab 4
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"gitflic.ru/project/bulla-max/mtusi2026lab/internal"
|
||||
"gitflic.ru/project/bulla-max/mtusi2026lab/internal/attachments"
|
||||
"gitflic.ru/project/bulla-max/mtusi2026lab/internal/config"
|
||||
"gitflic.ru/project/bulla-max/mtusi2026lab/internal/database"
|
||||
"gitflic.ru/project/bulla-max/mtusi2026lab/internal/health"
|
||||
@@ -49,7 +50,12 @@ func main() {
|
||||
}
|
||||
defer sessions.Close()
|
||||
|
||||
app := internal.New(cfg, pool, sessions)
|
||||
attachments.CleanupStaleUploads(cfg.UploadTempDir, time.Hour)
|
||||
|
||||
app, err := internal.New(cfg, pool, sessions)
|
||||
if err != nil {
|
||||
log.Fatalf("application: %v", err)
|
||||
}
|
||||
|
||||
addr := net.JoinHostPort(cfg.Host, cfg.Port)
|
||||
listenErr := make(chan error, 1)
|
||||
|
||||
Reference in New Issue
Block a user