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

Launch HTTPS enabled server in production. #69

Closed hiyaryan closed 7 months ago

hiyaryan commented 7 months ago

This PR establishes HTTPS in production.

Using conditionals, provided that the NODE_ENV is not production, the same http express server can be used in development or in a test environment.

When the NODE_ENV is production, https is enabled using the https module and loads the ssl certificates.

A new PORT environment variable is required in the backend to serve the app in development (e.g. port 3000) or to serve the app over https on the server, 8443.

hiyaryan commented 7 months ago

Updates the DEV_ORIGIN_PRIVATE_URL environment variable name in the resetUrl used for password reset to RESET_PASSWORD_URL making it easier to identify in the .env.