Be careful|

sy0313

园龄:4年9个月粉丝:10关注:1

03 2024 档案

nest.js中的配置抽离
摘要:1. 安装config包 npm install --save @nestjs/config 2. 在AppModule中引入: ConfigModule.forRoot({ isGlobal: true, envFilePath: 'src/.env' }) 需要设置全局模块,指定env文件的位置
42
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起