Fix .gitignore: /chatd not chatd (was ignoring cmd/chatd/ dir)
The bare 'chatd' pattern matched the cmd/chatd/ directory, preventing main.go from being tracked. Use /chatd to only match the binary at the repo root.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
chatd
|
/chatd
|
||||||
|
/bin/
|
||||||
data.db
|
data.db
|
||||||
.env
|
.env
|
||||||
*.exe
|
*.exe
|
||||||
|
|||||||
41
cmd/chatd/main.go
Normal file
41
cmd/chatd/main.go
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
// Package main is the entry point for the chatd server.
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.eeqj.de/sneak/chat/internal/config"
|
||||||
|
"git.eeqj.de/sneak/chat/internal/db"
|
||||||
|
"git.eeqj.de/sneak/chat/internal/globals"
|
||||||
|
"git.eeqj.de/sneak/chat/internal/handlers"
|
||||||
|
"git.eeqj.de/sneak/chat/internal/healthcheck"
|
||||||
|
"git.eeqj.de/sneak/chat/internal/logger"
|
||||||
|
"git.eeqj.de/sneak/chat/internal/middleware"
|
||||||
|
"git.eeqj.de/sneak/chat/internal/server"
|
||||||
|
"go.uber.org/fx"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// Appname is the application name, set at build time.
|
||||||
|
Appname = "chat" //nolint:gochecknoglobals
|
||||||
|
|
||||||
|
// Version is the application version, set at build time.
|
||||||
|
Version string //nolint:gochecknoglobals
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
globals.Appname = Appname
|
||||||
|
globals.Version = Version
|
||||||
|
|
||||||
|
fx.New(
|
||||||
|
fx.Provide(
|
||||||
|
config.New,
|
||||||
|
db.New,
|
||||||
|
globals.New,
|
||||||
|
handlers.New,
|
||||||
|
logger.New,
|
||||||
|
server.New,
|
||||||
|
middleware.New,
|
||||||
|
healthcheck.New,
|
||||||
|
),
|
||||||
|
fx.Invoke(func(*server.Server) {}),
|
||||||
|
).Run()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user