This commit is contained in:
Fran Jurmanović
2024-07-09 23:42:26 +02:00
commit 1bb73c866a
15 changed files with 425 additions and 0 deletions

29
cmd/api/main.go Normal file
View File

@@ -0,0 +1,29 @@
package main
import (
"acc-server-manager/local/api"
"acc-server-manager/local/utl/server"
"log"
"os"
"github.com/gofiber/fiber/v2"
"github.com/joho/godotenv"
)
func main() {
godotenv.Load()
app := fiber.New(fiber.Config{
Immutable: true,
})
file, err := os.OpenFile("logs.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0666)
if err != nil {
log.Print("Cannot open file logs.log")
}
log.SetOutput(file)
api.Init(app)
server.Start(app)
}