Setting up NodeJS with MongoDB using Docker and Docker Compose

Опубликовано: 10 Март 2026
на канале: LogRocket
25,269
338

Learn about Docker and how to spin up a Docker orchestration for your development environment so, that way, you don't have to install MongoDB, you can just run your NodeJS application and connect directly to a MongoDB instance that's running within the Docker orchestration.

Introduction -- 00:00
Scaffold the NodeJS app -- 02:49
Setting up views for our todo list -- 04:33
Scaffolding the Dockerfile and docker-compose.yml -- 06:58
Installing nodemon to watch files and refresh -- 10:44
Inserting todo entries via the MongoDB command line interface -- 12:52
Installing mongoose dependency -- 16:03
Creating a mongoose todo model -- 16:29
Connecting our application to MongoDB on startup -- 19:02
Testing the retrieving of todo entries from the database -- 22:33
Adding CSS styling to line through completed todos -- 22:49
Inserting an additional todo in MongoDB -- 24:02
Final test to see new todo shows in user interface -- 24:36
Try LogRocket for free: https://logrocket.com/?yt56