POC-golang-postgres-docker/cmd/main.go
2020-09-14 18:16:47 +05:00

23 lines
346 B
Go

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))
}