Vapor config

Vapor has a sophisticated configuration system that consists of configurations stored in the JSON file format. The configuration files are specified in the Config folder, and you can use these config files to set the server hostname or port, or even to configure the database you might be using. Vapor also supports environment specific configuration files, where you can have the application run on a different port in production than in development (locally), or specify different secrets, such as the database username and password for production environment for that development. By default, the Vapor template we cloned came with four config files:

  • app.json
  • crypto.json
  • droplet.json
  • server.json

app.json is a good place to specify ...

Get Hands-On Full-Stack Development with Swift 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.