A full-stack application with Angular frontend and Node.js/Express backend.
- Node.js (v18 or higher)
- npm or yarn
- PostgreSQL database
Backend:
cd backend
npm installFrontend:
cd frontend
npm installCreate a .env file in the backend/ directory with your database credentials:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=your_database_name
DB_USER=your_username
DB_PASSWORD=your_password
GEMINI_API_KEY=your_gemini_api_key
GEMINI_MODEL=gemini-2.5-flashOpen two terminals:
Terminal 1 - Backend:
cd backend
npm run devBackend runs on http://localhost:3000
Terminal 2 - Frontend:
cd frontend
ng serveFrontend runs on http://localhost:4200
Open your browser and navigate to http://localhost:4200
├── backend/ # Node.js/Express API
│ ├── src/
│ └── .env # Database configuration (create this)
├── frontend/ # Angular application
└── README.md
- Make sure your
.envfile is in thebackend/directory - Never commit
.envfiles to Git (already in.gitignore) - Backend must be running before using the frontend
- Database must be set up and running before starting the backend
- Backend won't start: Check your
.envfile and database connection - Frontend can't connect: Make sure backend is running on port 3000
- Port already in use: Stop other services using ports 3000 or 4200