Skip to main content

Environmental File

The .env file is located at project root and contains a multitude of settings, shared across Django and Node.js environments.

When the project is first installed, there will be a .env.example file instead. This file should be copied to a .env file so that it can be used.

cp .env.example .env

Availables configs in .env:

# All values are defaults
# A boolean that turns on/off debug mode.
# Reference:
# A boolean that turns on/off detailed information about requests sent within the project.
# Whether to use a secure cookie for the session cookie.
# Reference:
# A list of strings representing the host/domain names that this Django site can serve. Every domain is allowed in development.
# Database URL to be used as default database.
# Reference:
# URL for default cache, see below.
# URL for local cache. Dummy cache is something that acts like a cache but nothing is actually cached.
# Reference:
# URL to use when referring to static files located in STATIC_ROOT.
# Reference:
# The absolute path to the directory where collectstatic will collect static files for deployment.
# Reference:
# URL that handles the media served from MEDIA_ROOT.
# Reference:
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Reference:
# URL to use as a backend service. This service provides almost everything related to the project, such as users, orders, widgets etc. If we're developing a hypothetical project called PZ, the hypothetical service backend URL could be as above. If we wanted, we could also connect to a different project to have their users, see their widgets etc.
# The port which Webpack will use with WebpackDevServer, which is used for auto-reloading the page on change. You only need to change this if you have issues running to projects at the same time and it is only relevant if you're using `yarn dev`, it won't be used with `yarn dev:pure`.