diff options
| author | Bobby <[email protected]> | 2026-03-07 15:09:42 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-03-07 15:09:42 +0530 |
| commit | 8f8d41413ff775b6d721059783a0e2de4f90f50c (patch) | |
| tree | 40923d049ee7df8b0bc90d74373c94cdd4d8b230 /middleware/globals.go | |
| parent | 41926c10ea2e8496ce4b528262f5047ccbe6f155 (diff) | |
| download | dove-8f8d41413ff775b6d721059783a0e2de4f90f50c.tar.xz dove-8f8d41413ff775b6d721059783a0e2de4f90f50c.zip | |
feat: add configuration management and server setup
- Implemented configuration file creation and loading in config.go.
- Added default configuration content embedded in embed.go.
- Introduced logging middleware for HTTP requests.
- Created Makefile for build and setup automation.
- Integrated Tailwind CSS and HTMX for frontend styling and interactivity.
- Developed basic authentication flow with login and dashboard pages.
- Enhanced error handling and user feedback in templates.
- Updated dependencies in go.mod and go.sum.
Diffstat (limited to 'middleware/globals.go')
| -rw-r--r-- | middleware/globals.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/middleware/globals.go b/middleware/globals.go new file mode 100644 index 0000000..8a186bb --- /dev/null +++ b/middleware/globals.go @@ -0,0 +1,12 @@ +package middleware + +import ( + "dove/config" + + "github.com/gofiber/fiber/v2" +) + +func globals(context *fiber.Ctx) error { + context.Locals("AuthEnabled", config.AuthEnabled) + return context.Next() +} |
