Tinkering with how to do a 'check view, then static' style of templates, but maybe I need to do a generator?
This commit is contained in:
parent
abc9fbda2e
commit
b9d5dbb2e9
3 changed files with 20 additions and 11 deletions
8
main.go
8
main.go
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
@ -25,6 +24,8 @@ func main() {
|
|||
app := fiber.New(fiber.Config{
|
||||
Views: engine,
|
||||
ViewsLayout: "layouts/main",
|
||||
CaseSensitive: true,
|
||||
StrictRouting: true,
|
||||
})
|
||||
|
||||
app.Use(logger.New())
|
||||
|
@ -33,11 +34,6 @@ func main() {
|
|||
api.Setup(app)
|
||||
data.Setup("sqlite3", "db.sqlite3")
|
||||
|
||||
app.Static("/", "./public", fiber.Static{
|
||||
Compress: true,
|
||||
CacheDuration: 1 * time.Nanosecond,
|
||||
})
|
||||
|
||||
// this sets up graceful shutdown
|
||||
go func() {
|
||||
if err := app.Listen(":5001"); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue