Compare commits
No commits in common. "e1e93a933660dc3cefa18a98ad2244f00834d9e7" and "28063e3f467e1d52a8afa6f8d4e0d59d9ef60471" have entirely different histories.
e1e93a9336
...
28063e3f46
7
main.go
7
main.go
|
@ -33,8 +33,6 @@ type AppMetadata struct {
|
|||
}
|
||||
|
||||
func init() {
|
||||
// set production mode on gin, if you are facing issues then remove this line and see what is going on in debug mode
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
// Load .env file
|
||||
if err := godotenv.Load(); err != nil {
|
||||
// Create .env if it doesn't exist
|
||||
|
@ -44,11 +42,6 @@ func init() {
|
|||
ioutil.WriteFile(".env", []byte(envContent), 0644)
|
||||
godotenv.Load()
|
||||
}
|
||||
websrvport := os.Getenv("PORT")
|
||||
if websrvport == "" {
|
||||
websrvport = "8080"
|
||||
}
|
||||
fmt.Printf("Starting web server on port %s\n", websrvport)
|
||||
}
|
||||
|
||||
func authMiddleware() gin.HandlerFunc {
|
||||
|
|
Loading…
Reference in New Issue
Block a user