Skip to content

Instantly share code, notes, and snippets.

@AseemWangoo
Created October 19, 2022 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AseemWangoo/7a11081f7ff680dc5ac31f18182985df to your computer and use it in GitHub Desktop.
Save AseemWangoo/7a11081f7ff680dc5ac31f18182985df to your computer and use it in GitHub Desktop.
Start server in go
srv := &http.Server{
Handler: router,
Addr: ":8081",
WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second,
}
log.Fatal(srv.ListenAndServe())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment