Пример #1
0
func newServer() *server {
	s := &server{
		session: liblush.NewSession(),
		root:    root,
		web:     web.NewServer(),
		tmplts:  tmplts,
	}
	s.web.Config.StaticDirs = []string{root + "/static"}
	s.web.User = s
	for _, f := range serverinitializers {
		f(s)
	}
	return s
}
Пример #2
0
func newServer() *server {
	assets := getAssets()
	s := &server{
		session: liblush.NewSession(),
		web:     web.NewServer(),
	}
	s.httpHandler = s.web
	s.web.Config.StaticDirs = []string{assets.Web}
	s.web.User = s
	for _, f := range serverinitializers {
		f(s)
	}
	return s
}