mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-11 17:29:37 +02:00
Successfully configured and connected PostgreSQL database for NoteFlow. Backend changes: - Added dotenv package and configured .env loading in server.js - Increased PostgreSQL connection timeout from 2s to 10s - Added connection URL logging for debugging - Configured to use PostgreSQL on port 5432 (instead of 5499) PostgreSQL setup: - Installed PostgreSQL 16 locally - Created 'noteflow' database and user - Fixed SSL certificate permissions - Configured TCP listening on localhost - Set up password authentication (md5) Database configuration: - Uses .env file for DATABASE_URL and credentials - Connection: postgresql://noteflow:***@localhost:5432/noteflow - All tables created and initialized successfully - Admin user created (username: admin, password: admin) This resolves the "no notes displaying" issue. The application now connects to a working PostgreSQL database and can store/retrieve notes. Files changed: - server.js: Added dotenv.config() at top - config/database.js: Increased timeout, added logging - package.json: Added dotenv dependency - config/database-postgres.js: Backup of PostgreSQL config