Created
August 9, 2022 00:09
-
-
Save lalizita/455f94c127b5278f690f9bed3d7a783c to your computer and use it in GitHub Desktop.
Simple server with go
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprint(w, "Hello my friend") | |
}) | |
http.ListenAndServe(":8080", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment