Exemplo n.º 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
}
Exemplo n.º 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
}