import { join } from 'path';

const IS_DEV = process.argv.includes('ENV=DEV');
const BASE_PATH = join(__dirname, '..');

export default {
  IS_DEV,
  BASE_PATH,

  serve: {
    port: 3000,
  },
  staticAssets: {
    resource: {
      path: join(BASE_PATH, 'RESOURCE_BUCKET'),
      prefix: '/file-bucket',
    },

    front: {
      path: join(BASE_PATH, 'front'),
    },
    textBookFront: {
      path: join(BASE_PATH, 'tf'),
      prefix: '/text-book',
    },
  },

  mysql: {
    host: 'localhost',
    port: 3306,
    username: 'root',
    password: '123456',
    database: 'huai_li',
    synchronize: true,
    autoLoadEntities: true,
  },

  swagger: {
    title: '接口文档',
    version: '1.0',
    path: 'api-docs',
  },
};
