1. Public API v3
DATA SPORT
  • DATABASE-SPORT
    • Tổng quan
    • Logic
      • Logic tổng thể
    • Projects
      • Yêu cầu hệ thống
      • Architecture
        • Database
    • Public APi
      • Tổng quan
      • Cài đặt
    • Public API v3
      • Tổng quan
      • Cài đặt
    • Cron Make File
      • Tổng quan
  • GOLANG-THESPORT
    • Tổng quan
    • Architecture
      • System
      • Database
      • Source Code
    • Development
      • Local
      • Production
  • GOLANG-KSPORT
    • Tổng quan
    • Architecture
      • System
      • Database
      • Source Code
    • Development
      • Production
  • CRONJOB-LARAVEL
    • Tổng quan
    • Logic
      • Logic tổng thể
    • Projects
      • Yêu cầu hệ thống
      • Architecture
        • System
        • Source code
        • Database
      • Development
        • Dev
        • Production
      • Public API
        • Common API
          • League & Cup Profile (Basic)
          • Schedule & Results (Basic)
          • Match Modify Record
          • List of Countries
          • List of Bookmakers
          • Configuration instructions
        • Live animation
          • Configuration instructions
          • Schedule & Results
        • Live Data
          • Livescores for Today
          • Livescores Changes
          • Schedule & Results
          • Schedule Changes
          • Events
          • Stats
          • Corner
          • Lineups
          • Injury
          • Match List of Live Text
          • Live Text
          • Transfer
        • Profile
          • League & Cup Profile
          • Subleague Profile
          • Cup Stage Profile
          • Team Profile
          • Team Profile Copy
          • Team Profile for Search
          • Player Profile
          • Player Profile for Search
          • Referee Profile
          • Teamlist with Player Profile
        • Stats
          • Matches Analysis
          • List of Player Stats (Match)
          • Player Stats (Match)
          • List of Player Stats (League & Cup)
          • Player Stats (League & Cup)
          • League Standing (Get Subleague)
          • League Standing
          • Cup Standing
          • Top Scorer
          • FIFA Ranking
        • Odds (18 bookmakers)
          • Pre-match and In-play Odds (Main)
          • Live Odds Changes (Main)
          • Historical Odds (Main)
          • Future Odds (Main)
          • Pre-match and In-play Odds (All)
          • Live Odds Changes (All)
          • Historical Odds (All)
          • Future Odds (All)
          • European Odds (Halftime)
          • In-play Odds
          • In-play Odds (Halftime)
          • Odd Modify Record
        • European Odds (200+ Bookmakers)
          • European Odds (200+ Bookmakers)
        • Other Odds
          • Outrights
          • First/Last Team To Score (pre-match)
          • Goals Odd/Even (pre-match)
          • Goals Odd/Even (In-play)
          • Number of Goals in Match (pre-match)
          • Number of Goals in Match (In-play)
          • Half Time/Full Time (pre-match)
          • Half Time/Full Time (In-play)
          • Correct Score (pre-match)
          • Correct Score (In-play)
          • Half Time Correct Score (pre-match)
          • Half Time Correct Score (In-play)
          • Handicap Corners (pre-match)
          • Handicap Corners (In-play)
          • Total Corners (pre-match) - Tổng phạt góc trước trận đấu: First Odds
          • Total Corners (In-play) - Tổng số quả phạt góc (Trong trận) - Run Odds
          • Double Chance(pre-match)
          • EuroHandicap(pre-match)
  • GOLANG-WEBSOCKET
    • Tổng Quan
    • Logic
      • Logic tổng thể
    • Projects
      • Yêu cầu hệ thống
      • Architecture
        • System
        • Source code
      • Development
        • Dev
        • Production
      • Public API
        • API
  1. Public API v3

Cài đặt

Hướng dẫn cài đặt Wsport API
Thông tin nhánh
Nhánh Production: wsport-api-commercial-production
Link nhánh Production:
https://git.nospace.network/thscore/sport-api/wsport-api/-/tree/wsport-api-commercial-production
1.
Yêu cầu hệ thống (Prerequisites)
Go: Phiên bản 1.24.0 trở lên.
Docker & Docker Compose: Để chạy Redis, Elasticsearch (nếu cần).
MySQL: Phiên bản 8.0 trở lên.
Công cụ khuyến nghị:
golang-migrate
sqlc
air (chỉ dùng cho development)
2.
Các bước cài đặt
Bước 1: Clone và chuyển sang nhánh Production
Bashgit clone https://git.nospace.network/thscore/sport-api/wsport-api/-/tree/wsport-api-commercial-production
git checkout wsport-api-commercial-production
Bước 2: Cài đặt Dependencies
go mod download
go mod tidy
3.
Chạy ứng dụng
Lệnh chạy chính thức (Production):
go run main.go
4.
Environment Variables (.env) – Phiên bản Production
API_KEY=15bca33657b59b88dda8f0428c808831
DB_URL=https://db.bongdalu.moi
DB_CONNECTION=mysql
DB_HOST=thscore.cluster-ro-ctqmyks801ro.ap-southeast-1.rds.amazonaws.com
DB_PORT=3306
DB_DATABASE=bgnshwhs321
DB_USERNAME=bgnshwhs321
DB_PASSWORD=
DB_SSLMODE=disable
FILE_URL=https://img.winfast.dev
REDIS_HOST=185.199.53.139
REDIS_PORT=23423
REDIS_PASSWORD=null
REDIS_DB=1
REDIS_PREFIX=thscoredb_database_thscoredb_cache_:
KDATA_REDIS_HOST=18.143.120.88
KDATA_REDIS_PORT=43123
KDATA_REDIS_PASSWORD=null
KREDIS_PREFIX=
KREDIS_DB=0
Modified at 2026-03-30 08:23:32
Previous
Tổng quan
Next
Tổng quan
Built with