aboutsummaryrefslogtreecommitdiff
path: root/src/main.go
diff options
context:
space:
mode:
authorAlexander Kavon <hawk@alexkavon.com>2023-11-14 01:00:21 -0500
committerAlexander Kavon <hawk@alexkavon.com>2023-11-14 01:00:21 -0500
commit60f4a3e21f186d7bbc6e1f3239dc2dc06fa1ffac (patch)
tree180f17411afd50958e601e4dc1bafca70702d073 /src/main.go
parent699e1edf05207f906583659fb250269ad5ec1f36 (diff)
new packages for users, posts, server
Diffstat (limited to 'src/main.go')
-rw-r--r--src/main.go19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/main.go b/src/main.go
index 3c2fe5e..bdfb610 100644
--- a/src/main.go
+++ b/src/main.go
@@ -1,19 +1,14 @@
package main
import (
- "net/http"
- "gitlab.com/alexkavon/newsstand/conf"
- "github.com/go-chi/chi/v5"
- "github.com/go-chi/chi/v5/middleware"
+ "gitlab.com/alexkavon/newsstand/src/conf"
+ "gitlab.com/alexkavon/newsstand/src/server"
)
func main() {
- // load config
- conf.Load()
- r := chi.NewRouter()
- r.Use(middleware.Logger)
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("Yello There!"))
- })
- http.ListenAndServe(":8080", r)
+ // load config
+ conf.Load()
+ // connect database
+ // start server
+ server.Start()
}