Move web assets under webapi package. (#26)

This commit is contained in:
Jamie Holdstock 2020-05-18 15:20:13 +01:00 committed by GitHub
parent 7dbee5b6c2
commit 04311000e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 2 deletions

View File

@ -40,6 +40,7 @@ func run(ctx context.Context) error {
// Waitgroup for services to signal when they have shutdown cleanly.
var shutdownWg sync.WaitGroup
defer log.Info("Shutdown complete")
// Open database.
db, err := database.Open(ctx, &shutdownWg, cfg.dbPath)

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -87,7 +87,7 @@ func router(releaseMode bool) *gin.Engine {
}
router := gin.New()
router.LoadHTMLGlob("templates/*")
router.LoadHTMLGlob("webapi/templates/*")
// Recovery middleware handles any go panics generated while processing web
// requests. Ensures a 500 response is sent to the client rather than
@ -101,7 +101,7 @@ func router(releaseMode bool) *gin.Engine {
}
// Serve static web resources
router.Static("/public", "./public/")
router.Static("/public", "webapi/public/")
router.GET("/", homepage)