Refactor database configuration to use centralized struct
Some checks failed
Go / build-and-release (push) Has been cancelled
Some checks failed
Go / build-and-release (push) Has been cancelled
Replaced individual environment variable access with a unified `DatabaseConfig` struct for all database backends. This centralizes configuration management, reduces redundant code, and ensures all options are documented in `app/config/config.go`. Backward compatibility is maintained with default values and retained constructors.
This commit is contained in:
@@ -15,6 +15,8 @@ docker run -d --name neo4j \
|
||||
|
||||
### 2. Configure Environment
|
||||
|
||||
All Neo4j configuration is defined in `app/config/config.go` and visible via `./orly help`:
|
||||
|
||||
```bash
|
||||
export ORLY_DB_TYPE=neo4j
|
||||
export ORLY_NEO4J_URI=bolt://localhost:7687
|
||||
@@ -22,6 +24,8 @@ export ORLY_NEO4J_USER=neo4j
|
||||
export ORLY_NEO4J_PASSWORD=password
|
||||
```
|
||||
|
||||
> **Note:** Configuration is centralized in `app/config/config.go`. Do not use `os.Getenv()` directly in package code - all environment variables should be passed via the `database.DatabaseConfig` struct.
|
||||
|
||||
### 3. Run ORLY
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user