All files / app/config defaultConfig.ts

100% Statements 7/7
50% Branches 1/2
100% Functions 0/0
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66  1x 1x   1x     1x 1x   1x                                                                                                           1x  
import {Config} from './config.d';
import dbConfig from './database-config';
import jwt from './jwt-config';
import {Config as SequelizeConfig} from 'sequelize';
const environment = process.env.NODE_ENV || 'development';
const sequelize: SequelizeConfig =
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  (dbConfig as any)[environment];
import path from 'path';
 
const defaultConfig: Config = {
  database: {
    sequelize,
    withFlush: false,
  },
  auth: {
    saltRounds: 8,
  },
  static: {
    path: path.resolve('./static'),
    disabled: false,
  },
  error: {
    withStack: false,
  },
  jwt,
  morgan: {
    formatString: 'dev',
  },
  user: {
    pb: {
      dimensions: 128,
    },
    signUpThroughRequest: true,
    maxLimitQuery: 20,
    maxUsernameLength: 25,
  },
  serverType: 'release',
  group: {
    maxMembers: 25,
    maxCars: 8,
  },
  mail: {
    accountRequest: {
      type: process.env.MAIL_ACCOUNT_REQUEST_TYPE,
      receiver: process.env.MAIL_ACCOUNT_REQUEST_RECEIVER,
      options: {
        service: process.env.MAIL_ACCOUNT_REQUEST_SERVICE,
        host: process.env.MAIL_ACCOUNT_REQUEST_HOST,
        port: process.env.MAIL_ACCOUNT_REQUEST_PORT,
        auth: {
          user: process.env.MAIL_ACCOUNT_REQUEST_USER,
          pass: process.env.MAIL_ACCOUNT_REQUEST_PASS,
        },
      },
    },
  },
  metrics: {
    enabled: true,
    tracesSampleRate: 1.0,
    dsn: 'https://7d4cc992f614416abcb1007107e12c16@o656739.ingest.sentry.io/5763203',
  },
};
 
export default defaultConfig;