func RunHttp(addr int) { web.SetTrac(true) r := web.New() Routes(r) log.CLog("[TRAC] Server start listen on # %d #\n", addr) err := http.ListenAndServe(":"+strconv.Itoa(addr), r) if err != nil { panic(err) } }
func main() { r := web.New() r.Get("/", fc) log.CLog("[TRAC] Server start listen on # %d #", 9900) err := http.ListenAndServe(":9900", r) if err != nil { panic(err) } }