We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d53be2 commit 8830ba7Copy full SHA for 8830ba7
cmd/main.go
@@ -6,18 +6,27 @@ import (
6
"devtasker/internal/utils"
7
"fmt"
8
"os"
9
+ "sync"
10
)
11
12
func main() {
13
+ var wg sync.WaitGroup
14
+
15
db := utils.ConnectDb()
16
utils.MigrateDb(db)
17
18
if os.Getenv("APP_ENV") != "production" {
- utils.SeedTasks(db)
19
+ wg.Add(1)
20
+ go func() {
21
+ defer wg.Done()
22
+ utils.SeedTasks(db)
23
+ }()
24
}
25
26
app := internal.App(db)
27
app.Listen(":3000")
28
29
fmt.Println("App listen to port 3000!")
30
31
+ wg.Wait()
32
0 commit comments