Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion internal/web/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,20 @@ type WebServer struct {

// NewWebServer creates a new web server instance
func NewWebServer(cfg *config.NexusConfig, nexusServer *nexus.Server, logger *zap.Logger) (*WebServer, error) {
// Load templates from file system
// Load HTML templates from file system
templatesPath := fmt.Sprintf("%s/templates/*.html", cfg.WebRoot)
templates, err := template.ParseGlob(templatesPath)
if err != nil {
return nil, fmt.Errorf("failed to load web templates from %s: %w", templatesPath, err)
}

// Load shell script templates
shellTemplatesPath := fmt.Sprintf("%s/templates/*.sh", cfg.WebRoot)
templates, err = templates.ParseGlob(shellTemplatesPath)
if err != nil {
return nil, fmt.Errorf("failed to load shell script templates from %s: %w", shellTemplatesPath, err)
}

return &WebServer{
config: cfg,
nexus: nexusServer,
Expand Down
239 changes: 0 additions & 239 deletions webroot/static/install_minion.sh

This file was deleted.

Loading