31 lines
914 B
Go
31 lines
914 B
Go
// Package main is the entry point for the chat-api service.
|
|
package main
|
|
|
|
import (
|
|
"git.threesix.ai/jordan/sp3-test-1770368381/pkg/app"
|
|
"git.threesix.ai/jordan/sp3-test-1770368381/pkg/logging"
|
|
"git.threesix.ai/jordan/sp3-test-1770368381/services/chat-api/internal/adapter/memory"
|
|
"git.threesix.ai/jordan/sp3-test-1770368381/services/chat-api/internal/api"
|
|
"git.threesix.ai/jordan/sp3-test-1770368381/services/chat-api/internal/service"
|
|
)
|
|
|
|
func main() {
|
|
// Create logger
|
|
logger := logging.Default()
|
|
|
|
// Create adapters (repositories)
|
|
exampleRepo := memory.NewExampleRepository()
|
|
|
|
// Create services (business logic)
|
|
exampleService := service.NewExampleService(exampleRepo, logger)
|
|
|
|
// Create application
|
|
application := app.New("chat-api", app.WithDefaultPort(8001))
|
|
|
|
// Register routes with dependency injection
|
|
api.RegisterRoutes(application, exampleService)
|
|
|
|
// Start server
|
|
application.Run()
|
|
}
|