An open API service indexing awesome lists of open source software.

https://github.com/rickcrz7/sports-api

API designed for a simple sport score tracker app with a simple admin webpage to manage data.
https://github.com/rickcrz7/sports-api

api backend-api database go mysql sports sql vue

Last synced: 3 months ago
JSON representation

API designed for a simple sport score tracker app with a simple admin webpage to manage data.

Awesome Lists containing this project

README

          

Simple Sports Score Tracker API (Go & MySQL)


This lightweight API and admin panel combo helps you track sports game scores. Perfect for a mobile app or personal project!

Features:

Track game scores for your favorite sports.
Admin panel for easy data management (add, update, delete games) created with Vue.

Tech Stack:

Built with Go and MySQL for a clean and efficient backend.

Getting Started


Clone repository


Set Up Database


Prerequisites



  • MySQL server installed and running

  • MySQL client tool or access to the MySQL command line

  • MySQL username and password

Steps


1. Open 4 MySQL client:



Graphical Client: Open your preferred MySQL client tool (e.g., MySQL Workbench).


2. Connect to your MySQL server:



Enter your password when prompted.

3. Run the SQL script:


Command Line: Type the following command and press Enter:

Bash
```
source path/to/data.sql
```

Replace ```path/to/data.sql``` with the actual path to the ```sports_mysql.sql``` file.

Graphical Client: Use the client's "Open file" or "Execute script" option to select and run the ```sports_mysql.sql``` file.


4. Verify the database and tables:


Type ```SHOW DATABASES;``` to check if the ```sports``` database was created successfully.

Type ```SHOW TABLES FROM sports;``` to view the tables created within the ```sports``` database.


Additional Notes



  • Ensure you have the necessary permissions to create databases and tables if you encounter errors.

  • Edit the sports_mysql.sql file before running it again to modify the database structure.

  • Refer to the official MySQL documentation https://www.mysql.com/ for more advanced MySQL operations.

Run backend


Prerequisites


Steps


1. Navigate to the project directory:



Use `cd` command to change directories to the cloned repository location.

2. Install dependencies:


Run `go mod download` to download required packages.

3. Build the project (optional):


Run `go build` to build the backend (refer to project documentation for specific commands).

4. Run the project:


Run `go run main.go` to run backend.