Setting up the database

To set up the database, all we have to do is the following:

  1. Add the following lines to the .env file:
Make sure you have entered the correct password.

To use the .env file in Xcode, you need to adjust the schema to run in your project:

Now, when you run your project in Xcode, it will automatically read the .env file.

You have successfully set up the database for the service. Now, let's work on the routes.

Get Hands-On Swift 5 Microservices Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.