aboutsummaryrefslogtreecommitdiff
path: root/src/main.go
diff options
context:
space:
mode:
authorAlexander Kavon <hawk@alexkavon.com>2023-11-29 02:05:38 -0500
committerAlexander Kavon <hawk@alexkavon.com>2023-11-29 02:05:38 -0500
commit1c32e1497525bc6f609898f0f79bd6cc3e6d92fb (patch)
tree99abc1c2690b151bfb3d45e9f76a8770b3597e7a /src/main.go
parent5e26ebc96bd41f9d232573d873cb6cb55f0050c4 (diff)
user create/insert into users table, pgxpool defer moved to top of app, me.tmpl.html, secret hashing with argon2id, updated migrations
Diffstat (limited to 'src/main.go')
-rw-r--r--src/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.go b/src/main.go
index 0687aae..4dc2caf 100644
--- a/src/main.go
+++ b/src/main.go
@@ -12,7 +12,9 @@ func main() {
config := conf.NewConf()
// connect database
// start server
- s := server.NewServer(config, db.NewDb(config))
+ database := db.NewDb(config)
+ defer database.Close()
+ s := server.NewServer(config, database)
s.BuildUi()
routers := []server.Routes{
user.Routes,