Created
September 25, 2022 15:03
-
-
Save percybolmer/42b5a50028eca9d0200d1e7e5c942474 to your computer and use it in GitHub Desktop.
This file contains hidden or 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() { | |
// Create a root ctx and a CancelFunc which can be used to cancel retentionMap goroutine | |
rootCtx := context.Background() | |
ctx, cancel := context.WithCancel(rootCtx) | |
defer cancel() | |
setupAPI(ctx) | |
// Serve on port :8080, fudge yeah hardcoded port | |
err := http.ListenAndServeTLS(":8080", "server.crt", "server.key", nil) | |
if err != nil { | |
log.Fatal("ListenAndServe: ", err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment