# basic-config

> Super simple config

Latest version **0.0.2** (published 2016-06-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install basic-config
pnpm add basic-config
yarn add basic-config
bun add basic-config
```

## 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.0.2 |
| Published | 2016-06-13 |
| First published | 2016-06-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alex Baron |
| Maintainers | thealexbaron |
| Keywords | config, simple, basic |

## Links

- npm: https://www.npmjs.com/package/basic-config
- Repository: https://github.com/thealexbaron/node-basic-config
- Issues: https://github.com/thealexbaron/node-basic-config/issues
- npm.io page: https://npm.io/package/basic-config

## 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.0.2 (latest) — 2016-06-13
- 0.0.1 — 2016-06-12

## README

# node-basic-config

basic-config does not handle reading config files.
It has an init function that takes two objects that
represent your production, and dev config.

Once you have initialized your config, you can call
`config.get(parentConfigKey, nestedConfigKey)`. If a
key does not exist, an error will be thrown.

# Usage

    var config = require('config')

    config.init({
        // production config
        siteUrl: 'http://production.site',
        mailServiceCredentials: {
            username : 'production@user.com',
            password : 'userp@ss'
        }
    }, {
        // dev config
        siteUrl: 'http://dev.site',
        mailServiceCredentials: {
            username : 'development@user.com',
            password : 'devp@ss'
        }
    })

    console.log(
        config.get('siteUrl') //http://dev.site
    )

    console.log(
        config.get('mailServiceCredentials', 'username') // development@user.com
    )

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