added template files to be included in the binary
This commit is contained in:
		
							parent
							
								
									92c26172c6
								
							
						
					
					
						commit
						7472e2384e
					
				
							
								
								
									
										4
									
								
								main.go
								
								
								
								
							
							
						
						
									
										4
									
								
								main.go
								
								
								
								
							| 
						 | 
				
			
			@ -40,7 +40,8 @@ var (
 | 
			
		|||
//go:embed static/*
 | 
			
		||||
var staticFiles embed.FS
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//go:embed templates
 | 
			
		||||
var templateFiles embed.FS
 | 
			
		||||
 | 
			
		||||
type Config struct {
 | 
			
		||||
	Database struct {
 | 
			
		||||
| 
						 | 
				
			
			@ -404,6 +405,7 @@ func main() {
 | 
			
		|||
	webMux.HandleFunc("/logs", logsHandler)
 | 
			
		||||
	webMux.HandleFunc("/logs/{level}", logsHandler)
 | 
			
		||||
    webMux.Handle("/static/", http.FileServer(http.FS(staticFiles)))
 | 
			
		||||
    webMux.Handle("/templates/", http.FileServer(http.FS(templateFiles)))
 | 
			
		||||
	webMux.HandleFunc("/proxyAgent", proxyAgentHandler)
 | 
			
		||||
 | 
			
		||||
	// db := database.InitDB (cfg.Database.Username, cfg.Database.Password, cfg.Database.Host, cfg.Database.Port, cfg.Database.Name)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue