hiyaryan / the-cdj

The Cognitive Distortion Journal (CDJ) is a smart journaling tool that helps remedy distorted thinking. It can feel impossible to follow the CBT technique of labeling distorted thinking and finding alternative modes of thought (i.e. reframing) while cognitive distortions are occurring. The CDJ does that work for you. -- The CDJ is in beta testing!!
https://thecdj.app
3 stars 0 forks source link

Connect to MongoDB Atlas in production. #68

Closed hiyaryan closed 7 months ago

hiyaryan commented 7 months ago

This PR adds code to setup the database in production. The MongoDB Atlas service will be used when NODE_ENV is production, otherwise, a local MongoDB will be used in development and testing.

hiyaryan commented 7 months ago

Testing performed on server successfully connects to Atlas. Testing performed includes creating a new account, and writing a new entry. Then a login was attempted a second time with the same credentials successfully logging in again. Additionally, the database was inspected on Atlas with the recently added user data.