Files
noteflow/package.json
T
Claude 75c8149f8a feat: configure PostgreSQL to work with local server
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
2025-11-28 05:44:31 +00:00

123 lines
3.8 KiB
JSON

{
"name": "noteflow",
"version": "1.0.0",
"description": "Application NoteFlow - Notes et gestion de tâches moderne avec Docker et PostgreSQL",
"main": "server.js",
"scripts": {
"dev": "vite",
"build": "vite build",
"typecheck": "tsc -b",
"preview": "vite preview",
"start": "node server.js",
"server:dev": "nodemon server.js",
"test": "echo \"Error: no test specified\" && exit 1",
"docker:build": "docker-compose build",
"docker:up": "docker-compose up -d",
"docker:down": "docker-compose down",
"docker:logs": "docker-compose logs -f",
"docker:restart": "docker-compose restart",
"db:migrate": "node scripts/add-cleanup-tracking-fields.js",
"db:migrate:priority": "node scripts/add-priority-field.js",
"db:cleanup": "node scripts/database-cleanup.js",
"db:cleanup:dry-run": "DRY_RUN=true node scripts/database-cleanup.js"
},
"keywords": [
"notes",
"todo",
"docker",
"express",
"postgresql",
"react",
"typescript"
],
"author": "",
"license": "MIT",
"dependencies": {
"@dyad-sh/react-vite-component-tagger": "^0.8.0",
"@radix-ui/react-accordion": "^1.2.2",
"@radix-ui/react-alert-dialog": "^1.1.4",
"@radix-ui/react-aspect-ratio": "^1.1.1",
"@radix-ui/react-avatar": "^1.1.2",
"@radix-ui/react-checkbox": "^1.1.3",
"@radix-ui/react-collapsible": "^1.1.2",
"@radix-ui/react-context-menu": "^2.2.4",
"@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-dropdown-menu": "^2.1.4",
"@radix-ui/react-hover-card": "^1.1.4",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-menubar": "^1.1.4",
"@radix-ui/react-navigation-menu": "^1.2.2",
"@radix-ui/react-popover": "^1.1.4",
"@radix-ui/react-progress": "^1.1.1",
"@radix-ui/react-radio-group": "^1.2.2",
"@radix-ui/react-scroll-area": "^1.2.2",
"@radix-ui/react-select": "^2.1.4",
"@radix-ui/react-separator": "^1.1.1",
"@radix-ui/react-slider": "^1.2.2",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-switch": "^1.1.2",
"@radix-ui/react-tabs": "^1.1.2",
"@radix-ui/react-toast": "^1.2.4",
"@radix-ui/react-toggle": "^1.1.1",
"@radix-ui/react-toggle-group": "^1.1.1",
"@radix-ui/react-tooltip": "^1.1.6",
"@tanstack/react-query": "^5.62.18",
"axios": "^1.13.2",
"bcrypt": "^5.1.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.4",
"cors": "^2.8.5",
"date-fns": "^3.6.0",
"dotenv": "^17.2.3",
"embla-carousel-react": "^8.5.2",
"express": "^4.18.2",
"express-rate-limit": "^7.1.5",
"express-validator": "^7.0.1",
"googleapis": "^166.0.0",
"helmet": "^7.1.0",
"input-otp": "^1.4.1",
"jsonwebtoken": "^9.0.2",
"lucide-react": "^0.469.0",
"multer": "^1.4.5-lts.1",
"next-themes": "^0.4.4",
"pg": "^8.11.3",
"react": "^19.0.0",
"react-day-picker": "^9.11.1",
"react-dom": "^19.0.0",
"react-hook-form": "^7.54.2",
"react-resizable-panels": "^2.1.8",
"react-router-dom": "^7.1.3",
"recharts": "^2.15.0",
"rss-parser": "^3.13.0",
"sonner": "^1.7.2",
"sqlite3": "^5.1.7",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"vaul": "^1.1.1",
"winston": "^3.11.0"
},
"devDependencies": {
"@eslint/js": "^9.18.0",
"@types/node": "^22.10.5",
"@types/react": "^19.0.6",
"@types/react-dom": "^19.0.2",
"@vitejs/plugin-react": "^4.3.4",
"@vitejs/plugin-react-swc": "^3.7.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.18.0",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.14.0",
"nodemon": "^3.0.2",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.17",
"typescript": "~5.7.2",
"typescript-eslint": "^8.20.0",
"vite": "^6.0.7"
},
"engines": {
"node": ">=20.0.0"
}
}