当前位置:网站首页>Remember that a version of @nestjs/typeorm^8.1.4 cannot be obtained Env option problem
Remember that a version of @nestjs/typeorm^8.1.4 cannot be obtained Env option problem
2022-07-06 01:12:00 【crayon-shin-chan】
1. brief introduction
stay typeorm in , It could have been through .env File to configure connection options
But after upgrading to @nestjs/typeorm^8.1.4 typeorm^0.3.7 after , This function is removed
2. solve
have access to ConnectionOptionsReader To solve
import { ConnectionOptionsReader } from 'typeorm/connection/ConnectionOptionsReader'
TypeOrmModule.forRootAsync({
useFactory: async () => {
const reader = new ConnectionOptionsReader();
const options = await reader.all()
return options[0]
}
})
ConnectionOptionsReader Various configuration files will be loaded internally
边栏推荐
- cf:C. The Third Problem【关于排列这件事】
- 3D模型格式汇总
- Tcpdump: monitor network traffic
- Vulhub vulnerability recurrence 75_ XStream
- FFT learning notes (I think it is detailed)
- KDD 2022 | EEG AI helps diagnose epilepsy
- 黄金价格走势k线图如何看?
- Obstacle detection
- Zhuhai's waste gas treatment scheme was exposed
- Five challenges of ads-npu chip architecture design
猜你喜欢
激动人心,2022开放原子全球开源峰会报名火热开启
282. Stone consolidation (interval DP)
Beginner redis
SSH login is stuck and disconnected
What is the most suitable book for programmers to engage in open source?
从 1.5 开始搭建一个微服务框架——调用链追踪 traceId
可恢复保险丝特性测试
Blue Bridge Cup embedded stm32g431 - the real topic and code of the eighth provincial competition
Cf:c. the third problem
[pat (basic level) practice] - [simple mathematics] 1062 simplest fraction
随机推荐
Paging of a scratch (page turning processing)
Recursive method to realize the insertion operation in binary search tree
ADS-NPU芯片架构设计的五大挑战
Modify the ssh server access port number
Who knows how to modify the data type accuracy of the columns in the database table of Damon
Four commonly used techniques for anti aliasing
cf:C. The Third Problem【关于排列这件事】
VMware Tools安装报错:无法自动安装VSock驱动程序
Ubantu check cudnn and CUDA versions
Recoverable fuse characteristic test
关于softmax函数的见解
Fibonacci number
Use of crawler manual 02 requests
Novice entry depth learning | 3-6: optimizer optimizers
Beginner redis
现货白银的一般操作方法
Construction plan of Zhuhai food physical and chemical testing laboratory
Cannot resolve symbol error
[groovy] compile time meta programming (compile time method interception | method interception in myasttransformation visit method)
记一个 @nestjs/typeorm^8.1.4 版本不能获取.env选项问题