summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-11-02 13:14:03 +0200
committerKyren223 <Kyren223@proton.me>2024-11-02 13:18:21 +0200
commitc5064f6bbd06596ba1eb002904b9572427d71fc6 (patch)
treeed747581c2eb99758f6b66981c328f96caa7c652 /cmd
parent7ad5f5aa60cc940dbd4c6ec6cb091e7214a3fdb4 (diff)
feat: client and server api changes to accomedate DB
Diffstat (limited to 'cmd')
-rw-r--r--cmd/client/main.go1
-rw-r--r--cmd/server/main.go5
2 files changed, 5 insertions, 1 deletions
diff --git a/cmd/client/main.go b/cmd/client/main.go
index de800e7..61ea570 100644
--- a/cmd/client/main.go
+++ b/cmd/client/main.go
@@ -16,5 +16,4 @@ func main() {
log.SetOutput(logFile)
client.Run()
-
}
diff --git a/cmd/server/main.go b/cmd/server/main.go
index 4b504f6..0552c41 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -8,6 +8,7 @@ import (
"syscall"
"github.com/kyren223/eko/internal/server"
+ "github.com/kyren223/eko/internal/server/api"
)
const port = 7223
@@ -20,6 +21,9 @@ func main() {
defer logFile.Close()
log.SetOutput(logFile)
+ api.ConnectToDatabase()
+ defer api.CloseDatabase()
+
server := server.NewServer(port)
ctx, cancel := context.WithCancel(context.Background())
@@ -33,3 +37,4 @@ func main() {
server.ListenAndServe(ctx)
}
+