POC-golang-postgres-docker/cmd/main.go

23 lines
346 B
Go
Raw Permalink Normal View History

2020-09-14 13:16:47 +00:00
package main
import (
"domain/genityapp/internal/app"
"fmt"
_ "github.com/lib/pq"
"log"
"net/http"
)
func main() {
app.InitDb()
defer app.CloseDB()
http.HandleFunc("/get-data", app.UserGetHandler)
http.HandleFunc("/post-data", app.UserPostHandler)
fmt.Println("Listening on :5000")
log.Fatal(http.ListenAndServe(":5000", nil))
}