Cinemania is now structured as a Node.js + Express application with EJS templates.
- Install dependencies:
npm install- Initialize the database (requires PostgreSQL):
# IMPORTANT: If you are using WSL, you must start the PostgreSQL service first:
sudo service postgresql start
# Then run the initialization script:
sudo -u postgres psql -f db_setup.sql
# On Windows/macOS (using pgAdmin or Postico):
# Connect to your local server and execute the contents of db_setup.sql- Start server:
npm start- Open in browser:
http://localhost:8080
index.js- Express server entrypointviews/pagini/index.ejs- main homepage templateviews/fragmente/head.ejs- reusable head sectionviews/fragmente/header.ejs- reusable header/navigation sectionviews/fragmente/footer.ejs- reusable footer sectionresurse/- static assets served by Express
Express serves static files from resurse using server-style absolute paths:
/resurse/stiluri/...for CSS/resurse/imagini/...for images and favicons/resurse/documente/...for PDF and downloadable files
All resource references in EJS pages should use absolute URLs (for example /resurse/stiluri/general.css) and not relative paths.