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.
- Host: GitHub
- URL: https://github.com/rickcrz7/sports-api
- Owner: rickCrz7
- Created: 2023-11-15T17:54:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-18T17:16:23.000Z (about 1 year ago)
- Last Synced: 2025-04-19T06:02:51.055Z (about 1 year ago)
- Topics: api, backend-api, database, go, mysql, sports, sql, vue
- Language: Go
- Homepage:
- Size: 8.32 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
- Git installed and configured
- Go installed (Download from: https://go.dev/doc/install)
- Cloned Sports-API repository
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.