Skip to content

Instantly share code, notes, and snippets.

@monirz
Last active July 30, 2019 07:38
Show Gist options
  • Save monirz/020c2de1427212fa9900b0046bbe4f0f to your computer and use it in GitHub Desktop.
Save monirz/020c2de1427212fa9900b0046bbe4f0f to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"net/http"
"github.com/gorilla/mux"
)
func main() {
r := mux.NewRouter()
r.HandleFunc("/", rootHandler)
fmt.Println("Listening on : 9000")
http.ListenAndServe(":9000", r)
}
func rootHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Docker test server running!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment