25 lines
505 B
Go
25 lines
505 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"net"
|
|
|
|
pkg_cdp "git.loafle.net/odds_crawler/odds-crawler-backend/pkg/v1/cdp"
|
|
api_cdp "git.loafle.net/odds_crawler/odds-crawler-proto/pkg/api/v1/cdp"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
func main() {
|
|
lis, err := net.Listen("tcp", ":50051")
|
|
if err != nil {
|
|
log.Fatalf("failed to listen: %v", err)
|
|
}
|
|
s := grpc.NewServer()
|
|
|
|
api_cdp.RegisterCDPServiceServer(s, pkg_cdp.NewCDPServiceServer())
|
|
|
|
if err := s.Serve(lis); err != nil {
|
|
log.Fatalf("failed to serve: %v", err)
|
|
}
|
|
}
|