add competition service (it`s broken, I will fix it later)

This commit is contained in:
Timur Kh.
2025-12-16 23:14:01 +03:00
parent 7499a14024
commit 69d99e08ea
13 changed files with 1116 additions and 5 deletions
+32
View File
@@ -0,0 +1,32 @@
package main
import (
"log"
"os"
"os/signal"
"syscall"
"datarush/internal/competition/config"
"datarush/internal/competition/server"
)
func main() {
cfg, err := config.Load()
if err != nil {
log.Fatalf("failed to load config: %v", err)
}
srv := server.New(cfg)
if err := srv.Start(); err != nil {
log.Fatalf("failed to start server: %v", err)
}
quit := make(chan os.Signal, 1)
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
<-quit
log.Println("shutting down competition server...")
srv.Stop()
log.Println("competition server stopped")
}
+26
View File
@@ -1,6 +1,32 @@
package main
import (
"log"
"os"
"os/signal"
"syscall"
"datarush/internal/lms/config"
"datarush/internal/lms/server"
)
func main() {
cfg, err := config.Load()
if err != nil {
log.Fatalf("failed to load config: %v", err)
}
srv := server.New(cfg)
if err := srv.Start(); err != nil {
log.Fatalf("failed to start server: %v", err)
}
quit := make(chan os.Signal, 1)
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
<-quit
log.Println("shutting down auth server...")
srv.Stop()
log.Println("core server stopped")
}