File tree Expand file tree Collapse file tree 4 files changed +249
-66
lines changed
Expand file tree Collapse file tree 4 files changed +249
-66
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,6 @@ Thumbs.db
4141# Docker
4242docker-compose.override.yml
4343.pip-cache /
44+
45+ # Build artifacts
46+ build /
Original file line number Diff line number Diff line change 1+ .
Original file line number Diff line number Diff line change 22
33#include < string>
44#include < cstdlib> // for getenv()
5+ #include < iostream> // for std::cerr
56
67// Global configuration
78const int PORT = 8080 ;
@@ -59,10 +60,18 @@ inline std::string get_pg_db() {
5960
6061inline std::string get_pg_user () {
6162 const char * u = getenv (" POSTGRES_USER" );
62- return u ? u : " jic" ;
63+ if (!u) {
64+ std::cerr << " WARNING: Using default database user. Set POSTGRES_USER environment variable for production." << std::endl;
65+ return " jic" ;
66+ }
67+ return u;
6368}
6469
6570inline std::string get_pg_password () {
6671 const char * p = getenv (" POSTGRES_PASSWORD" );
67- return p ? p : " jic_password" ;
72+ if (!p) {
73+ std::cerr << " WARNING: Using default database password. Set POSTGRES_PASSWORD environment variable for production." << std::endl;
74+ return " jic_password" ;
75+ }
76+ return p;
6877}
You can’t perform that action at this time.
0 commit comments