Hashing password
Using postgres' pgcrypt
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/uptrace/bun/extra/bundebug"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -23,6 +24,7 @@ func main() {
|
||||
log.Fatalf("Error loading .env file: %v", err)
|
||||
}
|
||||
environ := os.Getenv("ENVIRONMENT")
|
||||
|
||||
port := os.Getenv("BACKEND_DOCKER_PORT")
|
||||
if environ == "DEV" {
|
||||
port = os.Getenv("BACKEND_PORT")
|
||||
@@ -41,6 +43,10 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
core.DB.AddQueryHook(bundebug.NewQueryHook(bundebug.WithVerbose(true)))
|
||||
|
||||
defer core.DB.Close()
|
||||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
core.HandleRoutes(mux, map[string]core.Handler{
|
||||
|
||||
Reference in New Issue
Block a user