package main

import (
	"be-vpn/internal/server"
	"github.com/gin-gonic/gin"
	"log"
)

func main() {
	r := gin.Default()
	r.Use(gin.Recovery())
	r.Static("/static", "./static")
	r.GET("/config", server.Config)
	r.PUT("/used_duration", server.AddUsedDuration)
	r.POST("/register", server.Register)
	r.GET("/secret/random", server.SecretRandom)
	r.GET("/list", server.List)
	r.GET("/secret", server.Secret)
	r.GET("/health", server.Health)

	if err := r.Run(":80"); err != nil {
		log.Fatalf("err: %+v", err)
	}
}
