diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-08-26 08:53:24 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-08-26 08:53:24 +0300 |
| commit | f1b7589b2936335957a6a1da1eea3d66233ad0ce (patch) | |
| tree | 1975af217c190f5dbdb23b96015cef45206302d4 /main.go | |
| parent | docs: profile improvement swagger (#51) (diff) | |
| download | lphub-f1b7589b2936335957a6a1da1eea3d66233ad0ce.tar.gz lphub-f1b7589b2936335957a6a1da1eea3d66233ad0ce.tar.bz2 lphub-f1b7589b2936335957a6a1da1eea3d66233ad0ce.zip | |
refactor: reorganizing packages
Former-commit-id: 99410223654c2a5ffc15fdab6ec3e921b5410cba
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -7,8 +7,8 @@ import ( | |||
| 7 | 7 | ||
| 8 | "github.com/gin-gonic/gin" | 8 | "github.com/gin-gonic/gin" |
| 9 | "github.com/joho/godotenv" | 9 | "github.com/joho/godotenv" |
| 10 | "github.com/pektezol/leastportalshub/backend/api" | ||
| 10 | "github.com/pektezol/leastportalshub/backend/database" | 11 | "github.com/pektezol/leastportalshub/backend/database" |
| 11 | "github.com/pektezol/leastportalshub/backend/routes" | ||
| 12 | _ "github.com/pektezol/leastportalshub/docs" | 12 | _ "github.com/pektezol/leastportalshub/docs" |
| 13 | ) | 13 | ) |
| 14 | 14 | ||
| @@ -19,8 +19,8 @@ import ( | |||
| 19 | // @license.name GNU General Public License, Version 2 | 19 | // @license.name GNU General Public License, Version 2 |
| 20 | // @license.url https://www.gnu.org/licenses/old-licenses/gpl-2.0.html | 20 | // @license.url https://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
| 21 | 21 | ||
| 22 | // @host lp.ardapektezol.com/api | 22 | // @host lp.ardapektezol.com/api |
| 23 | // @BasePath /v1 | 23 | // @BasePath /v1 |
| 24 | func main() { | 24 | func main() { |
| 25 | if os.Getenv("ENV") == "PROD" { | 25 | if os.Getenv("ENV") == "PROD" { |
| 26 | gin.SetMode(gin.ReleaseMode) | 26 | gin.SetMode(gin.ReleaseMode) |
| @@ -31,6 +31,6 @@ func main() { | |||
| 31 | } | 31 | } |
| 32 | router := gin.Default() | 32 | router := gin.Default() |
| 33 | database.ConnectDB() | 33 | database.ConnectDB() |
| 34 | routes.InitRoutes(router) | 34 | api.InitRoutes(router) |
| 35 | router.Run(fmt.Sprintf(":%s", os.Getenv("PORT"))) | 35 | router.Run(fmt.Sprintf(":%s", os.Getenv("PORT"))) |
| 36 | } | 36 | } |