This commit is contained in:
jdl
2025-01-04 13:36:55 +01:00
parent 2549e1ae08
commit 36172bf310
4 changed files with 13 additions and 12 deletions

View File

@@ -19,14 +19,14 @@ var templateFS embed.FS
type Config struct {
RootDir string
ListenAddr string
Secure bool
Insecure bool
}
type App struct {
api *api.API
mux *http.ServeMux
tmpl map[string]*template.Template
secure bool
api *api.API
mux *http.ServeMux
tmpl map[string]*template.Template
insecure bool
}
func NewApp(conf Config) (*App, error) {
@@ -36,10 +36,10 @@ func NewApp(conf Config) (*App, error) {
}
app := &App{
api: api,
mux: http.NewServeMux(),
tmpl: webutil.ParseTemplateSet(templateFuncs, templateFS),
secure: conf.Secure,
api: api,
mux: http.NewServeMux(),
tmpl: webutil.ParseTemplateSet(templateFuncs, templateFS),
insecure: conf.Insecure,
}
app.registerRoutes()