Giter VIP home page Giter VIP logo

Comments (5)

chandanrjit2021 avatar chandanrjit2021 commented on June 12, 2024 1

@olegforce
Maybe the file name and structure need changes to support the node modules. I have tried .looks fine to me

image

from b2c-crm-sync.

chandanrjit2021 avatar chandanrjit2021 commented on June 12, 2024

we can create the multiple.env files and based on the env just change the initialization path. No change in CLI command.
In b2c-crm-sync\cli.js
line no 14 : pass the path based on env condition
require('dotenv').config();
e.g.
require('dotenv').config({ path: '/custom/path/to/.env' })
Refer https://www.npmjs.com/package/dotenv#path for more details
Cheers

from b2c-crm-sync.

olegforce avatar olegforce commented on June 12, 2024

@chandanrjit2021 I just tried and it doesn't work:

// Initialize the .env confirmation
require('dotenv').config({path: '/.env.devorgpersonaccounts'});

I have the .env file and .env.devorgpersonaccounts, both for different CC and CRM environments. When I run npm run crm-sync:b2c:verify and above code is in the cli.js it still pick .env file and not .env.devorgpersonaccounts

from b2c-crm-sync.

olegforce avatar olegforce commented on June 12, 2024

@chandanrjit2021 Thanks, mate! I made it work, as per your example.

I think this is a valid issue ticket so project documentation can be updated on how to use multiple .env files:
image

So filename can't change and it should be always .env while manipulation with multiple environments should be done via a folder tree structure.

from b2c-crm-sync.

olegforce avatar olegforce commented on June 12, 2024

@chandanrjit2021 looks like this one caused another issue -> #20 now in order to run multi-cloud use-cases I have to copy the proper .env file into root folder as dotenv is not used for multi-cloud testing from what I see now.

I guess it is just again confirms this is a valid issue ticket and following issue should be addressed.

from b2c-crm-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.