The WeLoveMovies backend is a Node.js and Express-based API that powers the movie browsing and review platform. It provides robust endpoints for managing movies, theaters, and user reviews while ensuring data consistency and performance.
- RESTful API: Complete CRUD operations for movies, theaters, and reviews
- Data Validation: Comprehensive input validation and sanitization
- Error Handling: Detailed error responses and logging
- Database Management: Efficient PostgreSQL queries and relationships
- Authentication: Secure endpoint protection where needed
/movies
: Movie management endpoints/theaters
: Theater and showtime endpoints/reviews
: Review creation and management/critics
: Critic information endpoints/error
: Error handling middleware
- Clone the repository
- Navigate to back-end directory:
cd back-end
- Install dependencies:
npm install
- Copy
.env.sample
to.env
- Setup database:
npm run migrate
- Seed database:
npm run seed
- Start server:
npm start
npm start
: Launches production servernpm run dev
: Starts development servernpm test
: Runs test suitenpm run migrate
: Runs database migrationsnpm run seed
: Seeds database with initial data
- Node.js: Runtime environment
- Express: Web application framework
- PostgreSQL: Database management
- Knex.js: SQL query builder
- Jest: Testing framework