March 2020
Intermediate to advanced
392 pages
10h 10m
English
The configuration of this service is quite simple. All you need to do is add our migrations and set up the database.
Open Configure.swift and adjust the function to the following:
import Fluentimport FluentMySQLDriverimport Vaporfunc configure(_ app: Application) throws { guard let jwksString = Environment.process.JWKS else { fatalError("No value was found at the given public key environment 'JWKS'") } guard let urlString = Environment.process.MYSQL_CRED else { fatalError("No value was found at the given public key environment 'MYSQL_CRED'") } guard let url = URL(string: urlString) else { fatalError("Cannot parse: \(urlString) correctly.") } app.databases.use(try DatabaseDriverFactory.mysql(url: url), as: DatabaseID.mysql) ...Read now
Unlock full access