Docker is needed to start the server.
- clone the repository
cd task2
docker-compose run node yarn install
docker-compose up
- when all services was started opening a new terminal tab
./configure-cluster.sh
- then
./start-server.sh
The cluster start the sharding when the storage size reach 3 MB
- Open mongo shell:
docker-compose exec router01 mongo --port 27017
- select db:
use app
- check the db size:
db.stats()
- check sharding (after 3MB):
sh.status()
The server at startup ensure an admin account in the user collection: email: [email protected] password: admin