数据库
首页 > 数据库> > nest.js升级nest 8.x sqlserver数据库链接报错

nest.js升级nest 8.x sqlserver数据库链接报错

作者:互联网

nest 5.x升nest 8.x 中遇到的问题,sqlserver 链接需要ssl认证,nest7好像有警告。

解决方法:在数据库配置 options加入 trustServerCertificate:true

const dbconfig = {
  type: 'mssql',
  host: '***.***.*.***',
  database: 'testdb',
  password: '****',
  port: 1433,
  username: '**',
  logging: true,
 entities: [User, Role, Group, ClientSystem, ClientLogin, ClientAddress, SystemLog, SystemDepartment,
 SystemHospital, ClientExtendParam, ClientParams, LoginLog] ,
  synchronize: false, 
  extra:{
    trustServerCertificate:true
    }
};

 

标签:nest,sqlserver,链接,报错,true,数据库,trustServerCertificate
来源: https://www.cnblogs.com/119IT/p/15214294.html