Hi all, I’m following the mini series by Mikaela, this series is great btw, but now I am having trouble with this error message ‘Cannot assign to property: ‘tlsConfiguration’ is a ‘let’ constant’
The only difference between the tutorial and what I’m doing is switching Postgress for MySql. I’ve been able to find fixes and alternative methods so far but now I’m stuck here.
if let urlString = Environment.get("CLEARDB_DATABASE_URL"),
var mysqlConfig = MySQLConfiguration(url:urlString){
var tlsConfig = TLSConfiguration.makeClientConfiguration()
tlsConfig.certificateVerification = .none
// Error is on line below
mysqlConfig.tlsConfiguration = tlsConfig
app.databases.use(.mysql(configuration: mysqlConfig), as: .mysql)
}
Here is that code snippet from around the 24:13 mark of Mikaelas tutorial
(Any help is appreciated)