Skip to content

Instantly share code, notes, and snippets.

@stepankuzmin
Created August 1, 2017 15:21
Show Gist options
  • Save stepankuzmin/b8e64fb224430451c913bdee3a0083d7 to your computer and use it in GitHub Desktop.
Save stepankuzmin/b8e64fb224430451c913bdee3a0083d7 to your computer and use it in GitHub Desktop.
const params = {
host: {
description: 'PostgreSQL host',
boolean: false
}
};
// cliParams is a mapping between param keys and a cli param keys
const cliParams = { host: 'host' };
const envParams = { host: 'PGHOST' };
parse(params)
.cli(cliParams)
.env(envParams)
.dotEnv(envParams);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment