Static Propertyvapor 4.106.2Vapor
production
An environment for deploying your application to consumers.
Environment.swift:94static var production: Environment { get }
Other members in extension
Types
struct Process
The process information of an environment. Wraps
ProcessInto.processInfo
.
Type members
init(name: String, arguments: [String]
) Create a new
Environment
.static var development: Environment
An environment for developing your application.
static var process: Process
The current process of the environment.
static var testing: Environment
An environment for testing your application.
static func custom(name: String
) -> Environment Creates a custom environment.
static func detect(arguments: [String]
) throws -> Environment Detects the environment from
CommandLine.arguments
. Invokesdetect(from:)
.static func detect(from: inout CommandInput
) throws -> Environment Detects the environment from
CommandInput
. Parses the--env
flag, with theVAPOR_ENV
environment variable as a fallback.static func get(String
) -> String? Gets a key from the process environment
static func secret(key: String, fileIO: NonBlockingFileIO, on: EventLoop
) -> EventLoopFuture<String?> Reads a file’s content for a secret. The secret key is the name of the environment variable that is expected to specify the path of the file containing the secret.
static func secret(path: String, fileIO: NonBlockingFileIO, on: EventLoop
) -> EventLoopFuture<String?> Load the content of a file at a given path as a secret.
static func == (lhs: Environment, rhs: Environment
) -> Bool See
Equatable
Instance members
var arguments: [String]
The command-line arguments for this
Environment
.var commandInput: CommandInput
Exposes the
Environment
’sarguments
property as aCommandInput
.var isRelease: Bool
true
if this environment is meant for production use cases.let name: String
The environment’s unique name.