Getting started

For this recipe, we need to download, install, and run Postgres, and the easiest way to get Postgres is through the Homebrew package manager. We used Homebrew to install the Vapor CLI (Command-Line Interface), so it very likely that you already have Homebrew setup. If you don't have Homebrew installed, you can follow the given steps.

More information about Homebrew can be found at https://brew.sh.

Brew can be installed by running the following command and following the instructions:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

With Homebrew, or brew, installed, we can install Postgres:

brew install postgres

Now that we have Postgres installed, we can use brew to start the ...

Get Swift 4 Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.