slack-auth-1770277926/services/auth-api/cmd/server/main.go
rdev-worker fd9bf961bb
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
build: /implement-feature auth-system --requirements 'User model with email/...
2026-02-05 07:59:55 +00:00

37 lines
1.2 KiB
Go

// Package main is the entry point for the auth-api service.
package main
import (
"git.threesix.ai/jordan/slack-auth-1770277926/pkg/app"
"git.threesix.ai/jordan/slack-auth-1770277926/pkg/logging"
"git.threesix.ai/jordan/slack-auth-1770277926/services/auth-api/internal/adapter/memory"
"git.threesix.ai/jordan/slack-auth-1770277926/services/auth-api/internal/api"
"git.threesix.ai/jordan/slack-auth-1770277926/services/auth-api/internal/config"
"git.threesix.ai/jordan/slack-auth-1770277926/services/auth-api/internal/service"
)
func main() {
// Create logger
logger := logging.Default()
// Load configuration
cfg := config.Load()
// Create adapters (repositories)
exampleRepo := memory.NewExampleRepository()
userRepo := memory.NewUserRepository()
// Create services (business logic)
exampleService := service.NewExampleService(exampleRepo, logger)
userService := service.NewUserService(userRepo, []byte(cfg.JWTSecret), "slack-auth-1770277926", logger)
// Create application
application := app.New("auth-api", app.WithDefaultPort(8001))
// Register routes with dependency injection
api.RegisterRoutes(application, exampleService, userService)
// Start server
application.Run()
}