This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
api/main.go
2023-01-03 10:49:49 +01:00

24 lines
356 B
Go

package main
import (
"gractwo-api/database"
"gractwo-api/router"
"github.com/joho/godotenv"
)
func main() {
//line valid only on dev. ignore
godotenv.Load("local.env")
//init database
database.CreateConnection()
//Init api
router := router.InitRouter()
err := router.Run(":2021")
if err != nil {
panic("failed to connect database")
}
}