Generate and configure the .env file

The .env is a special file that is not part of the sample module, but is important for use in your Adobe Developer App Builder application. This file contains secrets and other information. Avoid committing this file to any code repository.

Who is this video for?

  • Developers new to Adobe Commerce with limited experience using Adobe App Builder who wants to learn about the .env file.

Video content

  • Introduction to the .env file and its purpose
  • How to generate the .env file
  • How to append the file to add new secrets
  • Avoid committing this file because it contains sensitive information

Code Sample

# Specify your secrets here
# The .env file must not be committed to source control
## Adobe I/O Runtime credentials
## Adobe I/O Console service account credentials (JWT) Api Key

# You can include some commerce OAUTH credentials too, our sample module will use this

You can see these static values being used in the sample module in file actions/commerce.index.js.

        const oauth = getCommerceOauthClient(
                url: params.COMMERCE_BASE_URL,
                consumerKey: params.COMMERCE_CONSUMER_KEY,
                consumerSecret: params.COMMERCE_CONSUMER_SECRET,
                accessToken: params.COMMERCE_ACCESS_TOKEN,
                accessTokenSecret: params.COMMERCE_ACCESS_TOKEN_SECRET

On this page