1 Star 0 Fork 0

silencc-nodejs/awesome-nest-boilerplate

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ormconfig.ts 925 Bytes
一键复制 编辑 原始数据 按行查看 历史
Narek 提交于 2022-02-04 12:25 . fix(): fix entity scan pattern
import './src/boilerplate.polyfill';
import type { TypeOrmModuleOptions } from '@nestjs/typeorm';
import { UserSubscriber } from './src/entity-subscribers/user-subscriber';
import { SnakeNamingStrategy } from './src/snake-naming.strategy';
const configs: TypeOrmModuleOptions & { seeds: string[]; factories: string[] } =
{
type: 'postgres',
host: process.env.DB_HOST,
port: Number(process.env.DB_PORT),
username: process.env.DB_USERNAME,
password: process.env.DB_PASSWORD,
database: process.env.DB_DATABASE,
namingStrategy: new SnakeNamingStrategy(),
subscribers: [UserSubscriber],
entities: [
'src/modules/**/*.entity{.ts,.js}',
'src/modules/**/*.view-entity{.ts,.js}',
],
migrations: ['src/database/migrations/*{.ts,.js}'],
seeds: ['src/database/seeds/**/*{.ts,.js}'],
factories: ['src/database/factories/**/*{.ts,.js}'],
};
module.exports = configs;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/silencc-nodejs/awesome-nest-boilerplate.git
git@gitee.com:silencc-nodejs/awesome-nest-boilerplate.git
silencc-nodejs
awesome-nest-boilerplate
awesome-nest-boilerplate
main

搜索帮助