Newer
Older
express-blog / src / config / defaults.js
module.exports = {
  endpoints: {
    revealBase: "https://access.jasonpoage.com/access/",
    authEndpoint: "https://auth.jasonpoage.com/api/firstfactor",
    loginPath: "/auth/login",
    statusEndpoint: "/api/auth/status",
    logoutEndpoint: "/api/auth/logout",
    defaultRedirect: "/guest-access",
  },
  meta: {
    node_env: "development",
    site_owner: undefined,
    country: undefined,
    root_dir: process.cwd(),
  },
  testing: {
    username: "test",
    group: "test-users",
    password: "",
  },
  logging: {
    log_dir: "logs",
    log_level: "info",
    db_path: "logs/logs.sqlite",
    levels: {
      error: 0,
      warn: 1,
      event: 2,
      security: 3,
      notice: 4,
      info: 5,
      debug: 6,
      analytics: 7,
    },
    colors: {
      error: "red",
      warn: "yellow",
      security: "magenta",
      notice: "cyan",
      info: "green",
      event: "blue",
      analytics: "white",
      debug: "gray",
    },
    session: {
      filename: "session-%DATE%.log",
      date_pattern: "YYYY-MM-DD",
      zipped_archive: true,
      max_files: "30d",
    },
    daily_rotate: {
      date_pattern: "YYYY-MM-DD",
      zipped_archive: true,
      max_files: "14d",
      filename_suffix: "-%DATE%.log",
    },
    pretty_print: {
      colors: true,
      depth: null,
      break_length: 80,
      compact: false,
    },
  },
  cleanup: {
    development: {
      maxSessionCount: 25,
      sessionRetentionHours: 1,
      maxTotalSizeMB: 50,
      maxDiskUsagePercent: 85,
      cleanupIntervalMinutes: 15,
      emergencyCleanupRatio: 0.7,
    },
    production: {
      maxSessionCount: 100,
      sessionRetentionHours: 24,
      maxTotalSizeMB: 200,
      maxDiskUsagePercent: 90,
      cleanupIntervalMinutes: 60,
      emergencyCleanupRatio: 0.5,
    },
  },
  public: {
    schema: "https",
    port: 80,
    domain: "localhost",
    address: "0.0.0.0",
  },
  network: {
    schema: "http",
    port: 3000,
    domain: "localhost",
    address: "0.0.0.0",
  },
  auth: {
    verify: null,
    login: null,
    cache_ttl: 120000,
    timeout_ms: 5000,
  },
  session: {
    cookie: {
      secure: false,
      sameSite: "Lax",
      domain: undefined,
    },
  },
  mail: {
    secure: false,
    auth: null,
    domain: "localhost",
    host: "localhost",
    port: 1025,
    newsletter: "newsletter@localhost",
    pass: null,
    defaultSubject: "New Contact Form Submission",
    log_path: "../../data/emails.json",
  },
  hcaptcha: {
    secret: null,
    key: null,
  },
};