Pull the MongoDB image from the Docker registry:
docker pull mongo
Run a new container using the MongoDB image with bound port 27017:
docker run --name some-mongo -p 27017:27017 -d mongo
Connect to the MongoDB instance running in the container:
docker exec -it some-mongo mongo
To persist the data, you can mount a host directory as a data volume for the container:
docker run --name some-mongo -v /my/own/datadir:/data/db -d mongo
To specify the MongoDB configuration options by creating a custom mongod.conf file and mounting it as a configuration volume for the container:
docker run --name some-mongo -v /my/own/mongod.conf:/etc/mongod.conf -d mongo --config /etc/mongod.conf
An example of a basic mongod.conf file that can be used to configure a MongoDB instance:
# mongod.conf
storage: dbPath: /data/db journal: enabled: true
systemLog: destination: file logAppend: true path: /var/log/mongodb/mongod.log
net: port: 27017 bindIp: 0.0.0.0
processManagement: fork: true pidFilePath: /var/run/mongodb/mongod.pid
replication: replSetName: rs0
### Ref
* [Websocket Server with Express](https://cheatcode.co/tutorials/how-to-set-up-a-websocket-server-with-node-js-and-express)
* [API Guide](https://github.com/losikov/api-example)
* [Angular tips - youtube channel](https://www.youtube.com/@kreuzercode/videos)