cisagov / con-pca-api

API Docker Container for Con-PCA
Creative Commons Zero v1.0 Universal
7 stars 0 forks source link

feature: code cleanup after docdb removal #965

Closed itsmostafa closed 1 year ago

itsmostafa commented 1 year ago

Clean up database connection get_db() function

๐Ÿ—ฃ Description

Clean up code and update format on connection to the database Replaced all env vars with one env var MONGO_URI Also removed the now defunct env var MONGO_TYPE

The format to connect in your local environment will be: MONGO_URI=mongodb://root:really_secure_password123@mongodb:27017

๐Ÿ’ญ Motivation and context

DocumentDb is no longer used and instead connect to a database cluster in Mongo Atlas

๐Ÿงช Testing

tested connection locally

โœ… Pre-approval checklist