This repository has been archived on 2024-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
golang-rest-example/cmd/server.go
2024-02-01 19:57:25 +01:00

20 lines
262 B
Go

package main
import (
"log"
"net/http"
"github.com/mentos1386/golang-rest-example/pkg/api"
)
func main() {
srv, err := api.NewServer()
if err != nil {
log.Fatal(err)
}
if err := http.ListenAndServe(":8080", srv); err != nil {
log.Fatal(err)
}
}