aboutsummaryrefslogtreecommitdiff
path: root/main.go
blob: 3c2fe5e1da60e0a9b3a0a2717158a8fe58fe8dfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)
}