Skip to content

Instantly share code, notes, and snippets.

@DiegoSantosWS
Created September 17, 2018 17:44
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 DiegoSantosWS/136e39dc86d56f6f7495315db34c1afe to your computer and use it in GitHub Desktop.
Save DiegoSantosWS/136e39dc86d56f6f7495315db34c1afe to your computer and use it in GitHub Desktop.
router html
package main
import (
"net/http"
m "github.com/DiegoSantosWS/gotoweb/example_html/models"
)
func main() {
//rota index
http.HandleFunc("/", m.IndexPage)
//rota contato
http.HandleFunc("/contato", m.ContactPage)
//fmt.Println("Estou escutando comandante...")
//Instanciando servidor na porta 1234
http.ListenAndServe(":1234", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment