google app engine - Gorilla mux subdomain -


How can I add a subdomain using Gorilla Max and do something like this:

  http: //api.localhost:8080/  

I have tried

  r: = mux.NewRouter () r.HandleFunc ( "/ Path", method). Method ("post"). The host ("api.example.com")  

but I do not want to pass the domain because I need to change the domain every time I upload it to the app engine, its Besides, I think the above code will not use the app engine framework.

You can define one for the subdomain:

  S: = r.Host ("www.domain.com"). Subfotter () s.HandleFunc ("/ path", method). Methods ("Post")  

Comments