mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-26 09:04:07 +01:00
Simplify database support to SQLite only
Removed PostgreSQL and MySQL support to reduce complexity: - Removed postgres and mysql drivers from go.mod - Simplified database.Initialize() to only use SQLite - Simplified DatabaseConfig struct (removed Driver, Host, Port, User, Password, SSLMode) - Removed GetDSN() method from config - Removed --db CLI flag (only --db-name remains for specifying SQLite file path) - Updated .env.example to remove MySQL/PostgreSQL options - Updated README_GOLANG.md to reflect SQLite-only support - Ran go mod tidy to clean up dependencies This makes the application simpler to deploy and maintain, with no external database dependencies required.
This commit is contained in:
parent
4aaa889634
commit
65f1265555
7 changed files with 44 additions and 107 deletions
20
.env.example
20
.env.example
|
|
@ -3,27 +3,9 @@ SERVER_HOST=0.0.0.0
|
|||
SERVER_PORT=3000
|
||||
GIN_MODE=debug
|
||||
|
||||
# Database Configuration
|
||||
DB_DRIVER=sqlite
|
||||
# Database Configuration (SQLite)
|
||||
DB_NAME=tracks.db
|
||||
|
||||
# For PostgreSQL:
|
||||
# DB_DRIVER=postgres
|
||||
# DB_HOST=localhost
|
||||
# DB_PORT=5432
|
||||
# DB_NAME=tracks
|
||||
# DB_USER=tracks
|
||||
# DB_PASSWORD=tracks
|
||||
# DB_SSLMODE=disable
|
||||
|
||||
# For MySQL:
|
||||
# DB_DRIVER=mysql
|
||||
# DB_HOST=localhost
|
||||
# DB_PORT=3306
|
||||
# DB_NAME=tracks
|
||||
# DB_USER=tracks
|
||||
# DB_PASSWORD=tracks
|
||||
|
||||
# Authentication Configuration
|
||||
JWT_SECRET=your-secret-key-change-this-in-production
|
||||
TOKEN_EXPIRY_HOURS=168
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue