diff --git a/config/development.yml b/config/development.yml index 08edfbe..7f71386 100644 --- a/config/development.yml +++ b/config/development.yml @@ -1,10 +1,56 @@ +server: + port: 7777 + origin: 'http://localhost:3000' + db: host: 'localhost' type: 'postgres' port: 5432 + database: 'truthy' username: 'postgres' - password: 'root' + password: '' synchronize: false jwt: - secret: 'example@123' + expiresIn: 900 + refreshExpiresIn: 604800 + cookieExpiresIn: 604800 + secret: 'Rtya$#asdf@sdfsco123ejsd@@3#' + +app: + name: 'Truthy' + version: '0.2.0' + description: 'Official Truthy API' + appUrl: 'http://157.245.148.131:7777' + frontendUrl: 'http://157.245.148.131:3000' + sameSite: true + +mail: + host: 'in-v3.mailjet.com' + port: 587 + user: 'e3818ebeda5d271f541c4925e12e60af' + pass: 'fd10758be28c2873ddf9e359644e873a' + from: 'alischettri83@gmail.com' + fromMail: 'alischettri83@gmail.com' + preview: false + secure: false + ignoreTLS: true + queueName: 'truthy-mail' + +queue: + driver: 'redis' + host: 'localhost' + port: 6379 + db: '' + password: '' + username: '' + +throttle: + global: + ttl: 60 + limit: 60 + login: + prefix: 'login_fail_throttle' + limit: 5 + duration: 2592000 + blockDuration: 3000 \ No newline at end of file diff --git a/package.json b/package.json index 09a5da0..bbaae38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "truthy-api", - "version": "0.2.0", + "version": "0.3.0", "description": "Truthy API", "author": "gobeam ", "license": "MIT", diff --git a/src/mail/mail.module.ts b/src/mail/mail.module.ts index 9b13e5e..9339598 100644 --- a/src/mail/mail.module.ts +++ b/src/mail/mail.module.ts @@ -45,7 +45,7 @@ const queueConfig = config.get('queue'); }, preview: mailConfig.preview, template: { - dir: __dirname + '/templates', + dir: __dirname + '/templates/email/layouts/', adapter: new PugAdapter(), options: { strict: true diff --git a/src/mail/mail.processor.ts b/src/mail/mail.processor.ts index fbc8621..7b678f9 100644 --- a/src/mail/mail.processor.ts +++ b/src/mail/mail.processor.ts @@ -57,7 +57,7 @@ export class MailProcessor { to: job.data.payload.to, from: process.env.MAIL_FROM || mailConfig.fromMail, subject: job.data.payload.subject, - template: __dirname + `/../mail/templates/email/layouts/email-layout`, + template: 'email-layout', context: job.data.payload.context, attachments: job.data.payload.attachments };