Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created June 27, 2018 16:06
Show Gist options
  • Select an option

  • Save azamsharp/45861e41aba92672985396854a8c9e81 to your computer and use it in GitHub Desktop.

Select an option

Save azamsharp/45861e41aba92672985396854a8c9e81 to your computer and use it in GitHub Desktop.
import FluentPostgreSQL
try services.register(FluentPostgreSQLProvider())
/// Register the configured SQLite database to the database config.
var databases = DatabasesConfig()
let databaseConfig = PostgreSQLDatabaseConfig(hostname: "localhost", username: "postgres", database: "blog")
let database = PostgreSQLDatabase(config: databaseConfig)
databases.add(database: database, as: .psql)
services.register(databases)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment