Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
Set Gin mode based on the environment and rename utility files
Browse files Browse the repository at this point in the history
  • Loading branch information
930C committed May 10, 2024
1 parent 099a893 commit 90b66f2
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 0 deletions.
Binary file added deployments/datamodel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions internal/routing/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ const contentTypeHeader = "Content-Type"
func InitRouter(databaseMgr managers.DatabaseMgr, mailMgr managers.MailMgr, jwtMgr managers.JWTMgr) *gin.Engine {
// Initialize router with logging and recovery middleware
router := gin.New()

// Set Gin mode to release if the environment is production
if os.Getenv("ENVIRONMENT") == "production" {
gin.SetMode(gin.ReleaseMode)
}

// Initialize middleware
setupCommonMiddleware(router)
// Setup routes
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 90b66f2

Please sign in to comment.