VaporPostgreSQL

1.1.2

PostgreSQL Provider for the Vapor web framework.
vapor-community/postgresql-provider

What's New

PostgreSQL Provider 1.1.2

2018-01-16T17:27:39Z

Changes:

  • The package now explicitly depends on vapor-community/postgresql-driver to support successful builds in the future, no matter how Vapor repos are renamed.

PostgreSQL Provider for Vapor

Adds PostgreSQL support to the Vapor web framework.

Usage

import Vapor
import VaporPostgreSQL

let drop = Droplet()
try drop.addProvider(VaporPostgreSQL.Provider.self)

Config

To build, create a postgresql.json file in the Config/secrets folder. You may need to create the secrets folder if it does not exist. The secrets folder is under the gitignore and shouldn't be committed.

Here's an example Config/secrets/postgresql.json

{
    "host": "127.0.0.1",
    "user": "postgres",
    "password": "",
    "database": "test",
    "port": 5432
}

Or, just set a url.

{
    "url": "psql://user:pass@host:5432/database"
}

Install and link PostgreSQL

Follow the instructions at vapor/postgresql to properly install and link PostgreSQL.

Description

  • Swift Tools 3.1.0

Dependencies

Last updated: Sun Jan 24 2021 01:18:56 GMT-0500 (GMT-05:00)