mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
starter
This commit is contained in:
@@ -1,9 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"wallet-api/pkg/api"
|
||||
"wallet-api/pkg/utl/common"
|
||||
"wallet-api/pkg/utl/db"
|
||||
"wallet-api/pkg/utl/server"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
server.Start()
|
||||
err := godotenv.Load()
|
||||
common.CheckError(err)
|
||||
|
||||
dbUrl := os.Getenv("DATABASE_URL")
|
||||
r := gin.Default()
|
||||
|
||||
conn := db.CreateConnection(dbUrl)
|
||||
api.Init(r, conn)
|
||||
|
||||
server.Start(r)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user