From 16165aea34a711027825b3f6512e73a0156f8068 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Tue, 10 Sep 2024 22:13:24 +0300 Subject: refactor: move backend entry, rename module --- main.go | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 main.go (limited to 'main.go') diff --git a/main.go b/main.go deleted file mode 100644 index ad465f8..0000000 --- a/main.go +++ /dev/null @@ -1,36 +0,0 @@ -package main - -import ( - "fmt" - "log" - "os" - - "github.com/gin-gonic/gin" - "github.com/joho/godotenv" - "github.com/pektezol/leastportalshub/backend/api" - "github.com/pektezol/leastportalshub/backend/database" - _ "github.com/pektezol/leastportalshub/docs" -) - -// @title Least Portals Database API -// @version 1.0 -// @description Backend API endpoints for the Least Portals Database. - -// @license.name GNU General Public License, Version 2 -// @license.url https://www.gnu.org/licenses/old-licenses/gpl-2.0.html - -// @host lp.ardapektezol.com -// @BasePath /api/v1 -func main() { - err := godotenv.Load() - if err != nil { - log.Fatal("Error loading .env file") - } - if os.Getenv("ENV") == "PROD" { - gin.SetMode(gin.ReleaseMode) - } - router := gin.Default() - database.ConnectDB() - api.InitRoutes(router) - router.Run(fmt.Sprintf(":%s", os.Getenv("PORT"))) -} -- cgit v1.2.3