sf-env-vars
v2.1.2
Published
Simple node library for accessing Salesforce-Env-Vars along side ts-force applications
Downloads
11
Readme
sf-env-vars
A simple npm package for accessing Salesforce-Env-Vars.
Usage
- Install
npm install sf-env-vars
- Define an ENV Class. The property names should match the ENV_VAR
DeveloperName
and must be assigned to null:
export class Env {
public FOO: string = null;
public BAR: number = null;
}
- Load & Use
import {load} from 'sf-env-vars';
const vars = await load(Env);
console.log(vars.FOO, vars.BAR);
Note: Currently uses ts-force as a peer dependency to connect & query salesforce. Will likely refactor in the future to accept a connection (and use more lightwieght client like axios).