.envfiles and contain all your secret environment variables that should not be pushed into source control. You can have multiple environment files that are loaded when the server first starts. We'll walk through how to configure your environment variables in this documentation.
LoadEnvironmentclass that is called in the
bootstrap/start.pyfile. This file in imported into the
wsgi.pyfile which is where the execution of the environment actually happens because of the import.
bootstrap/start.pyyou will see a code that looks something like:
.envfile for you based on the
.env-examplefile. If you have installed Masonite but do not see this
.envfile then you can create it manually and copy and paste the contents of
APP_ENVvariable inside your
.envfile it just loaded and then look for an environment with that value.
.envfile and the additional environment file defined in your
.envfile, you can load a third environment by specifying it in the constructor:
.env.localfile and the
5432to be an integer and need
Trueto be a boolean.
env()function in order to accomplish this which takes the place of
os.getenv(). This looks like: