2024-01-22 15:22:16 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
2024-09-17 17:13:22 +00:00
|
|
|
"github.com/labstack/echo/v4"
|
2024-09-14 00:05:55 +00:00
|
|
|
"github.com/maddalax/htmgo/framework/h"
|
2024-09-17 15:41:29 +00:00
|
|
|
_ "github.com/mattn/go-sqlite3"
|
2024-09-13 21:33:50 +00:00
|
|
|
"starter-template/pages"
|
|
|
|
|
"starter-template/partials/load"
|
2024-01-22 15:22:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
2024-09-17 17:13:22 +00:00
|
|
|
f := echo.New()
|
2024-09-13 01:31:18 +00:00
|
|
|
|
|
|
|
|
f.Static("/public", "./assets/dist")
|
2024-09-11 00:52:18 +00:00
|
|
|
|
2024-09-12 18:13:15 +00:00
|
|
|
load.RegisterPartials(f)
|
2024-09-11 00:52:18 +00:00
|
|
|
pages.RegisterPages(f)
|
2024-09-12 02:06:34 +00:00
|
|
|
|
2024-09-17 17:13:22 +00:00
|
|
|
//client, err := ent.Open("sqlite3", "file:ent.db?cache=shared&_fk=1")
|
|
|
|
|
//if err != nil {
|
|
|
|
|
// log.Fatalf("failed opening connection to sqlite: %v", err)
|
|
|
|
|
//}
|
|
|
|
|
//defer client.Close()
|
|
|
|
|
//// Run the auto migration tool.
|
|
|
|
|
//if err := client.Schema.Create(context.Background()); err != nil {
|
|
|
|
|
// log.Fatalf("failed schema resources: %v", err)
|
|
|
|
|
//}
|
2024-09-17 15:41:29 +00:00
|
|
|
|
2024-09-11 00:52:18 +00:00
|
|
|
h.Start(f, h.App{
|
|
|
|
|
LiveReload: true,
|
2024-01-22 15:22:16 +00:00
|
|
|
})
|
|
|
|
|
}
|