refactor: split sqlite db logic by domain#646
refactor: split sqlite db logic by domain#646Rayhan1967 wants to merge 3 commits intolaunchdarkly:mainfrom
Conversation
| handler := handlers.CombinedLoggingHandler(os.Stdout, r) | ||
|
|
||
| addr := fmt.Sprintf("0.0.0.0:%s", serverParams.Port) | ||
| addr := fmt.Sprintf("127.0.0.1:%s", serverParams.Port) |
There was a problem hiding this comment.
Curious what motivated this change? Switching from 0.0.0.0 to 127.0.0.1 restricts the server to localhost-only - was there a specific issue you were running into that prompted this?
Worth noting that some users might be running the CLI in containers, VMs, or remote dev environments where the server needs to be reachable from outside the host. Might be worth making the bind address configurable with the 0.0.0.0 as a default!
There was a problem hiding this comment.
Good point, @nieblara. You're right—I didn't fully account for the containerized or remote development workflows where 0.0.0.0 is essential.
I’ll revert the default to 0.0.0.0 to maintain compatibility for those environments. In a future PR, I might look into making the bind address configurable via a flag or environment variable to offer the best of both worlds (security and flexibility). Thanks for the catch!
Requirements
Related issues
None
Describe the solution you've provided
Refactored
internal/dev_server/db/sqlite.goto split the large monolithic file into domain-specific files (sqlite_projects.go,sqlite_overrides.go) for easier maintenance and testing.Describe alternatives you've considered
None
Additional context
None