-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
37 lines (28 loc) · 788 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main
import (
// "context"
"log"
// "os"
// apitoolkit "github.com/apitoolkit/apitoolkit-go"
"github.com/gin-gonic/gin"
"github.com/joho/godotenv"
"job_board/models"
)
func main() {
if err := godotenv.Load(); err != nil {
log.Fatalf("Failed to load the env vars: %v", err)
}
models.MigrateDb()
// ctx := context.Background()
// apitoolkitClient, err := apitoolkit.NewClient(ctx, apitoolkit.Config{APIKey: os.Getenv("API_TOOLKIT")})
// if err != nil {
// log.Fatalf("Failed to load monitoring keys: %v", err)
// }
app := gin.New()
// app.Use(apitoolkitClient.GinMiddleware)
app.MaxMultipartMemory = 8 << 20 //file size 8mb
router := app.Group("/api/v1")
AddRoutes(router)
app.Run(":3000")
log.Print("Server listening on http://localhost:3000/")
}