config.default.js 1.57 KB
/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  config.cluster = {
    listen: {
      port: 7009,
    },
  };

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1644800905769_2309';

  // add your middleware config here
  config.middleware = [];

  config.security = {
    csrf: {
      enable: false,
      ignoreJSON: true,
    },
  };

  config.cors = {
    origin: '*',
    allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH',
  };

  config.sequelize = {
    host: 'localhost',
    port: '5432',
    username: 'postgres',
    password: 'wawjr1314',
    database: 'ddn',
    dialect: 'postgres',
    pool: {
      max: 5,
      min: 0,
      idle: 10000,
    },
    logging: false,
  };
  // config.ed25519Address = 'DFy6P2sN1KLDNtppnqLBPWcnH8GTJRouGj'; // 旧网接收钱包地址 弃用
  config.naclSecret = 'puzzle elite rescue gun blush top floor surge injury popular pole inquiry';  // 新网转账钱包秘钥
  // config.ed25519Url = 'http://120.24.69.99:8001'; // 旧网节点地址 弃用
  config.naclUrl = 'http://8.142.20.158:8001'; // 新网节点地址
  // config.naclUrl = 'http://localhost:8001'; // 测试地址
  config.ed25519NetHash = 'b11fa2f2';// 旧网nethash
  config.naclNetHash = '0ab796cd'; // 新网nethash
  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  return {
    ...config,
    ...userConfig,
  };
};