Connecting to production and test database - se701g2/Doto GitHub Wiki
Overview
Developers only need to make sure they have a .env file containing the connection string to the development database. No additional work needed to connect to production database as everything has been set up to connect on deploy.
Development database
We have two databases set up for this project. The first database is hosted on MongoDB Atlas, this is our development database where each contributor can connect to during development. By default, to connect to this database the environment variable in your .env file should contain the connection string to connect to this database. The environment variable is called DEVELOPMENT_DB_CONN. Alternatively, if you wish to connect to a local database on your machine, then make sure mongodb is up and running and you can connect with mongoose (in index.js using the appropriate port number on your local mongodb instance).
Production database
The second database is our production database hosted on Azure cosmosDB. Developers do not need to do to anything to connect to this database when they deploy (Everything has been set up). When your application deploys to Azure (successfully merged into master) it will connect using the AZURE connection strings and authentication credentials which are stored in the Azure backend app service as part of its configuration. These environment variables are what index.js in the backend refer to with process.env.AZURE_CONN and process.env.AZURE_USER and process.env.AZURE_PW.