aboutsummaryrefslogtreecommitdiff
path: root/src/main.go
diff options
context:
space:
mode:
authorAlexander Kavon <hawk@alexkavon.com>2023-11-13 23:30:18 -0500
committerAlexander Kavon <hawk@alexkavon.com>2023-11-13 23:30:18 -0500
commit699e1edf05207f906583659fb250269ad5ec1f36 (patch)
treee18c7137f3f710fc25045e68f63d0e7a1acd3930 /src/main.go
parentfa63d31876bb522d6bd3dd2322c6f55f5c667a9c (diff)
scaffolding
Diffstat (limited to 'src/main.go')
-rw-r--r--src/main.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main.go b/src/main.go
new file mode 100644
index 0000000..3c2fe5e
--- /dev/null
+++ b/src/main.go
@@ -0,0 +1,19 @@
+package main
+
+import (
+ "net/http"
+ "gitlab.com/alexkavon/newsstand/conf"
+ "github.com/go-chi/chi/v5"
+ "github.com/go-chi/chi/v5/middleware"
+)
+
+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)
+}