Scripting with Mongo - AtlasOfLivingAustralia/profile-hub GitHub Wiki

Mongo scripting

There are situations where mongo documents need to be updated by running scripts. All such scripts are located in profile-service/scripts/mongo directory. The way to run the script is given below.

mongo HOST:PORT/DATABASE_NAME SCRIPT_NAME

An example

cd ~/profile-service/src/scripts/mongo
mongo localhost:27017/profiles addIsCustomMapConfigField.js