This project implements the Persistence interface using a MongoDB database. It is designed to seamlessly function with the same database the old core uses.
- Install MongoDB 7.0 or higher. Get it here.
- Install MongoDB Shell, Get it here.
- (optional) Install MongoDB Database Tools, Get them here.
- The server must be in replica set mode.
For a single instance, this can be achieved by adding this to the
mongod.cfg
file:The config file is usually located atreplication: replSetName: rs0
/etc/mongod.conf
(linux) or%PROGRAMFILES%/MongoDB/Server/<version>/bin/mongod.cfg
(windows) - Restart MongoDB, and then run
rs.initiate()
from a mongo shell to initialize the replication set. You enter a mongo shell usingmongosh
(linux) or%PROGRAMFILES%/MongoDB/Server/<version>/bin/mongosh.exe
(windows). - The recommended replica set name is
rs0
, as that's a sensible default and you will then be able to execute the mongodb integration tests, if the server is running on localhost with the default port27017
. If you already chose a different name, you can rename the replica set like this. - If you run MongoDB with those defaults, running the TPP.Core project will also work without requiring any further configuration changes.