Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dtd
/
go-webserver-boilerplate
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f85db4fe
authored
Feb 20, 2025
by
mhmdhaekal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(initialize): Add logger and healthcheck in app
1 parent
260f1234
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
cmd/app-1/main.go
cmd/app-1/main.go
View file @
f85db4f
...
...
@@ -5,6 +5,8 @@ import (
"os"
"github.com/gofiber/fiber/v3"
"github.com/gofiber/fiber/v3/middleware/healthcheck"
"github.com/gofiber/fiber/v3/middleware/logger"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"ui.ac.id/dtd/go-webserver-boilerplate/internal/handler"
...
...
@@ -28,6 +30,9 @@ func main() {
ErrorHandler
:
handler
.
ErrorHandler
,
})
app
.
Use
(
logger
.
New
())
app
.
Get
(
"/"
,
healthcheck
.
NewHealthChecker
())
//api group
api
:=
app
.
Group
(
"/api"
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment