Skip to content

Commit

Permalink
use init
Browse files Browse the repository at this point in the history
Signed-off-by: William <[email protected]>
  • Loading branch information
kwesidev committed Sep 5, 2024
1 parent 700435f commit a7ce69d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/speedy_auth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var databaseConnection *sql.DB
const SERVER_VERSION = "0.1.1"

// initializes the database connections and other connections
func initialize() {
func init() {

err := godotenv.Load()
if err != nil {
Expand Down Expand Up @@ -68,7 +68,6 @@ func initialize() {
log.Println("")
}
func main() {
initialize()
apiServer := apiserver.NewAPIServer(os.Getenv("SERVER_ADDRESS"), os.Getenv("SERVER_PORT"), databaseConnection)
apiServer.Run()
}

0 comments on commit a7ce69d

Please sign in to comment.