Vapor: 4.0.0-beta.3.8 Release

Release date:
January 24, 2020
Previous version:
4.0.0-beta.3.7 (released January 23, 2020)
Magnitude:
13 Diff Delta
Contributors:
1 total committer
Data confidence:
Commits:

Top Contributors in 4.0.0-beta.3.8

tanner0101

Directory Browser for 4.0.0-beta.3.8

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Application now attempts to load an environment-specific dotenv file during init. Any values in this file will override values from the default dotenv (#2159, fixes #2156).

For example, say you have the following files:

.env env FOO=bar .env.development env FOO=baz

If you run your app with --env development (or -e dev), the app will load both files and use FOO=baz. If you run your app with --env production (or -e prod), then only .env will be loaded and you will get FOO=bar.

This allows for a useful pattern where .env files are committed to git, but .env.* files are not. On new machines, or during deployment, you can run the following command to generate a new, local dotenv and easily fill out the required values.

$ cp .env .env.production

Note: Variables already existing in the process environment will not be overridden by dotenv files. For example, the following command will always use FOO=qux regardless of dotenv file values.

$ FOO=qux vapor run serve
// or
$ export FOO=qux
$ vapor run serve