From bbd61e2bad852c2a4a81307cbb51934dc21d09ff Mon Sep 17 00:00:00 2001 From: Sebastian Boldt Date: Wed, 24 May 2017 10:02:12 +0200 Subject: [PATCH] Update droplet.md The environment isn't available directly through the Droplet in Vapor 2 anymore. You need to use the config instead. --- 2.0/docs/vapor/droplet.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/2.0/docs/vapor/droplet.md b/2.0/docs/vapor/droplet.md index 5a84d151..4e071593 100644 --- a/2.0/docs/vapor/droplet.md +++ b/2.0/docs/vapor/droplet.md @@ -25,11 +25,11 @@ Creation of the `Droplet` normally happens in the `main.swift` file. For the sake of simplicity, most of the documentations sample code uses just the `main.swift` file. You can read more about packages and modules in the Swift Package Manager [conceptual overview](https://swift.org/package-manager/). ## Environment - -The `environment` property contains the current environment your application is running in. Usually development, testing, or production. +The `environment` is accessible via the config of the droplet. +It contains the current environment your application is running in. Usually development, testing, or production. ```swift -if drop.environment == .production { +if drop.config.environment == .production { ... } ```