Esempio n. 1
0
func RunWebServer(line *util.ChannelLine) {
	util.WebOut = line
	web.SetLogger(log.New(new(dummy), "", 0))
	web.Config.CookieSecret = util.Settings.CookieSecret()
	web.Get("/Liberator/(.*)", get)
	web.Get("/(.*)", index)
	web.Post("/Liberator/(.*)", post)
	web.Run("0.0.0.0:" + strconv.Uitoa(util.Settings.WebPort()))
}
Esempio n. 2
0
func main() {
	f, err := os.Create("server.log")
	if err != nil {
		println(err.Error())
		return
	}
	logger := log.New(f, "", log.Ldate|log.Ltime)
	web.Get("/(.*)", hello)
	web.SetLogger(logger)
	web.Run("0.0.0.0:9999")
}