Created
May 15, 2020 18:07
-
-
Save jimmya/d4d9290f6cdedbc12a0eacec92a3770d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vapor | |
extension Environment { | |
static var databaseURL: URL { | |
guard let urlString = Environment.get("DATABASE_URL"), let url = URL(string: urlString) else { | |
fatalError("DATABASE_URL not configured") | |
} | |
return url | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment