Last active
May 8, 2019 11:54
-
-
Save kyriediculous/3bb17943689e5ad10c40483b6e7ceb0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
// Configure 'log' package to give file name and line number on eg. log.Fatal | |
// Pipe flags to one another (log.LstdFLags = log.Ldate | log.Ltime) | |
log.SetFlags(log.LstdFlags | log.Lshortfile) | |
fmt.Println("Starting server on port :50051...") | |
// Start our listener, 50051 is the default gRPC port | |
listener, err := net.Listen("tcp", ":50051") | |
// Handle errors if any | |
if err != nil { | |
log.Fatalf("Unable to listen on port :50051: %v", err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment