Initial commit: FunStat MCP Server Go implementation
- Telegram integration for customer statistics - MCP server implementation with rate limiting - Cache system for performance optimization - Multi-language support - RESTful API endpoints 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
32
cmd/funstat-mcp/main.go
Normal file
32
cmd/funstat-mcp/main.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"funstatmcp/internal/app"
|
||||
"funstatmcp/internal/transport"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cfg, err := app.FromEnv()
|
||||
if err != nil {
|
||||
log.Fatalf("load config: %v", err)
|
||||
}
|
||||
|
||||
application, err := app.New(cfg)
|
||||
if err != nil {
|
||||
log.Fatalf("initialize app: %v", err)
|
||||
}
|
||||
|
||||
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
||||
defer cancel()
|
||||
|
||||
server := transport.NewServer(application, cfg)
|
||||
|
||||
if err := server.Run(ctx); err != nil {
|
||||
log.Fatalf("server exited with error: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user