-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDT24-24 | Create logger wrapper #10
Conversation
8afcff1
to
2bc3c30
Compare
2bc3c30
to
809a8d5
Compare
docker-compose.yml
Outdated
@@ -6,7 +6,7 @@ services: | |||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | |||
POSTGRES_DB: ${POSTGRES_DB} | |||
ports: | |||
- 5432:5432 | |||
- 5433:5432 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5432:5432 chai kina hatako ? eutai rakhda ni hunxa hola
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already have postgres installed in my main machine and I assume most of the people already have it too so keeping 5432 is causing port conflict.
new transports.File({ filename: 'logs/errors.log', level: 'error' }), | ||
new transports.File({ filename: 'logs/all.log' }), | ||
] | ||
: [new transports.Console({ format: format.combine(format.colorize({ all: true })) })], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wont there be logger file for development ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can check all the logs in our console in development.
@@ -0,0 +1,16 @@ | |||
import { format, transports } from 'winston'; | |||
const isProduction = process.env.APP_ENV === 'production'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After merging PDT24-25 lets use env.NODE_ENV ===APP_ENVIRONVENT.PRODUCTION
src/scripts/orm.config.ts
Outdated
@@ -9,7 +9,7 @@ const dataBaseConfigurations = { | |||
password: process.env.POSTGRES_PASSWORD, | |||
database: process.env.POSTGRES_DB, | |||
synchronize: false, // Should be false in production to use migrations | |||
logging: true, | |||
logging: process.env.APP_ENV === 'production' ? false : true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env.NODE_ENV === APP_ENVIRONVENT.PRODUCTION ? false: true
* feat: configure nodemailer servie for sending email * feat: create a basic email template for sending signup otp code * chore: rename param names and add function documentation * fix: use secure mailing port * refactor: remove sendEmail call from main and improve sendEmail method
Quality Gate passedIssues Measures |
Tasks
Changes
Notes