예제 #1
0
func (fs *FileSystem) GetSite(ctx serve.ServeContext, parent *serve.Site, name string) *serve.Site {
	site := new(serve.Site)
	site.Name = name
	site.Path = filepath.Join(parent.Path, name)
	site.Config = getConfig(site.Path)
	return site
}
예제 #2
0
func (fs *FileSystem) GetApplication(ctx serve.ServeContext, name string) *serve.Site {
	app := new(serve.Site)
	app.Name = name
	app.URI = "/" + name
	app.Path = filepath.Join(ctx.Server.Path(), "apps", name)
	app.Config = getConfig(app.Path)
	return app
}