# env-config-params

> A little helper for select config file according to NODE_ENV environment

Latest version **0.2.3** (published 2019-04-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install env-config-params
pnpm add env-config-params
yarn add env-config-params
bun add env-config-params
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2019-04-30 |
| First published | 2019-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | aleangrodriguez123@gmail.com |
| Maintainers | angelrodro |
| Keywords | config, environment, configuration, params |

## Links

- npm: https://www.npmjs.com/package/env-config-params
- Repository: https://github.com/AngelRodRo/env-config-param
- Homepage: https://github.com/AngelRodRo/env-config-param#readme
- Issues: https://github.com/AngelRodRo/env-config-param/issues
- npm.io page: https://npm.io/package/env-config-params

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.2.3 (latest) — 2019-04-30
- 0.2.2 — 2019-04-30
- 0.2.1 — 2019-04-27
- 0.2.0 — 2019-04-27
- 0.1.0 — 2019-04-27
- 0.0.1 — 2019-04-06

## README

env-config-params
=================

Utils for choose a config params file according to NODE_ENV.

## Installation

```
npm install --save env-config-params 
```

## Configuration

- Create a new folder where it will save all param configuration for local, development and production environment. For default the folder name is **config**.

- Add new configurations like this \<environment>.json. Example: local.json, development.json, production.json. **Note:** It could be JS files.

- Each config file need to have the next structure for db config params for create db uri string (optional), also it is possible to add fields as much as need:

```json user.json
{
    "port": 0,
    "db": {
        "host": "",
        "name": "",
        "port": "",
        "user": "",
        "password": ""
    }
}
```

- **NODE_ENV** should fit with config params file. For example, **NODE_ENV=production** then config file will be **production.json**. If there isn't any NODE_ENV defined, the default file it'll be **local.json**.

## Options

- **dbURI:** It allows to create an uri string with the DB params, this uri is added in the resulting config object.

## Example

```js
const config = require("env-config-params")({
  dbURI: true
});
```

---
_Source: https://npm.io/package/env-config-params · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
