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

21 lines
262 B
Go
Raw Normal View History

2024-02-01 18:57:25 +00:00
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)
}
}