DEV Community

Clever Cottonmouth
Clever Cottonmouth

Posted on

 

docker-compose.yml file

version: "3.8"
services:
mongodb:
image: mongo
container_name: mongodb
ports:
- "27017:27017"
volumes:
- data:/data
environment:
- MONGO_INITDB_ROOT_USERNAME=rootuser
- MONGO_INITDB_ROOT_PASSWORD=rootpassword
mongo-express:
image: mongo-express
container_name: mongo-express
restart: always
ports:
- "80:80"
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=rootuser
- ME_CONFIG_MONGODB_ADMINPASSWORD=rootpassword
- ME_CONFIG_MONGODB_HOST=mongodb
volumes:
data: {}
networks:
default:
name: mongodb_network

Top comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.