Add '18-expenses-chart/' from commit '78c9bd1d614c8bdd25a3e1d23bd0a39bb01e65f1'

git-subtree-dir: 18-expenses-chart
git-subtree-mainline: e13fa186e1
git-subtree-split: 78c9bd1d61
This commit is contained in:
efim
2024-03-12 07:09:35 +00:00
12 changed files with 335 additions and 0 deletions

21
18-expenses-chart/main.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"fmt"
"net/http"
"sunshine.industries/temp-exercise/templates"
"github.com/a-h/templ"
)
func main() {
component := templates.Hello("some name")
http.Handle("/", templ.Handler(component))
staticFs := http.FileServer(http.Dir("./static"))
http.Handle("/static/", http.StripPrefix("/static/", staticFs))
fmt.Println("starting to serve on :3000")
http.ListenAndServe(":3000", nil)
}