A droplet is a service container that gives you access to many features provided by Vapor. It makes it easy to do the following tasks:
- Access configurations specified in the config files in the Config folder
- Make network requests using Vapor's engine client
- Register routes for your application so that you can specify which URL path gets served by what file in your application
- Add middleware to your application
- Use providers in your application, which are other Swift packages that follow certain provider protocols, making it easy to add functionality to your application
- Start the application
One droplet is created inside of a Vapor application, and a Config is passed to it when constructing a new instance of the Droplet class. ...