Episode #362

Setting up Vapor with Postgresql

Series: Server-side Swift with Vapor

17 minutes
Published on November 9, 2018

This video is only available to subscribers. Get access to this video and 572 others.

In this episode we set up a new Vapor application to use Postgresql as the database. We'll see how to configure FluentPostgreSQL, how to create and set up a connection to the database, and look at the defaults for PostgresSQLModel. We'll also discuss the pros and cons of using UUID primary keys over auto-incrementing integers.

Episode Links

  • Postgres.app - My preferred way of installing Postgres on the Mac
  • Postico - My Postgres client of choice

This episode uses Vapor 3.0.8, Fluent postgresql-1.0.0.