feat: use go embed

This commit is contained in:
boojack
2022-07-10 09:02:56 +08:00
parent 48d8c6ee0f
commit 46d7ecca88
10 changed files with 66 additions and 9 deletions

View File

@ -38,12 +38,7 @@ func NewServer(profile *profile.Profile) *Server {
Timeout: 30 * time.Second,
}))
e.Use(middleware.StaticWithConfig(middleware.StaticConfig{
Skipper: middleware.DefaultSkipper,
Root: "web/dist",
Browse: true,
HTML5: true,
}))
embedFrontend(e)
// In dev mode, set the const secret key to make signin session persistence.
secret := []byte("usememos")