init
This commit is contained in:
27
app/cmd/app/main.go
Normal file
27
app/cmd/app/main.go
Normal file
@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"git.heldm.com/held/qrcode/internal/app/bootstrap"
|
||||
"git.heldm.com/held/qrcode/internal/infr/env"
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var app *gin.Engine
|
||||
|
||||
env.SetupEnvFile()
|
||||
|
||||
if os.Getenv("APP_ENV") == "dev" {
|
||||
app = bootstrap.NewAppDev()
|
||||
} else {
|
||||
app = bootstrap.NewApp()
|
||||
}
|
||||
|
||||
if err := app.Run(":3000"); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user