12 BUILDING THE MIDDLEWARE
The middleware is the software glue connecting the frontend we’ll create later to the existing MongoDB instance in the backend container. In this chapter, we’ll set up Mongoose, connect it to our database, and then create a Mongoose model for the application. In the next chapter, we’ll complete the middleware by writing a GraphQL API.
This middleware is part of Next.js; hence, we’ll work with the application container. But because the Docker daemon ensures that the files in our local application directory are instantly available within the working directory inside the application container, we can use our local ...
Get The Complete Developer now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.