• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

How to use dotenv file in CEP scripting

Contributor ,
Nov 05, 2021 Nov 05, 2021

Copy link to clipboard

Copied

According to this documentation:

To use a dotenv variable: 

process.env.ENV_VARIABLE // ENV_VARIABLE is the name of the variable you want to access.

Pretty straight forward node stuff.... So in my root folder I create a dotenv file ".env"

there I put:

TEST_VARIABLE=HITHERE

Then in a js file I run:

console.log(cep_node.process.env.TEST_VARIABLE);

This is appearing as undefiend.  What do I need to do to use my dotenv file?

TOPICS
Scripting

Views

206

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
New Here ,
Nov 14, 2024 Nov 14, 2024

Copy link to clipboard

Copied

LATEST

Did you ever solve this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines