added rendering of index
This commit is contained in:
19
internal/rendering/template.go
Normal file
19
internal/rendering/template.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package rendering
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func getFileContent() string {
|
||||
content, err := os.ReadFile("frontend/index.html")
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
return string(content)
|
||||
}
|
||||
|
||||
var IndexTemplate = template.Must(template.New("index").Parse(getFileContent()))
|
||||
Reference in New Issue
Block a user