Search⌘ K
AI Features

Creating the Movies Controller

Discover how to build a movies controller to handle API requests by connecting your backend with the movies data access object. Learn how to parse query strings for filtering and return movie results through Express routes.

In this lesson, we’ll create a controller to access the moviesDAO.js file, which we created previously.

MOVIEREVIEWS_DB_URI=mongodb+srv://admin:hello@cluster0.yjxj4.mongodb.net/sample_mflix?retryWrites=true&w=majority
MOVIEREVIEWS_NS=sample_mflix
PORT=5000
The initial files we will build on

Creating a movie controller

...