# app-spec

> Get application configuration from spec of required environment variables.

Latest version **0.11.7** (published 2017-03-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install app-spec
pnpm add app-spec
yarn add app-spec
bun add app-spec
```

## 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.11.7 |
| Published | 2017-03-18 |
| First published | 2017-02-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | @evanxsummers |
| Maintainers | evanx |

## Links

- npm: https://www.npmjs.com/package/app-spec
- Repository: https://github.com/evanx/app-spec
- Issues: https://github.com/evanx/app-spec/issues
- npm.io page: https://npm.io/package/app-spec

## Dependencies (1)

- [objecta](https://npm.io/package/objecta.md) ^0.1.4

## Recent versions

- 0.11.7 (latest) — 2017-03-18
- 0.11.6 — 2017-03-12
- 0.11.4 — 2017-03-12
- 0.11.3 — 2017-03-12
- 0.10.4 — 2017-03-12
- 0.10.3 — 2017-03-10
- 0.10.2 — 2017-03-10
- 0.10.1 — 2017-03-10
- 0.8.5 — 2017-03-10
- 0.8.4 — 2017-03-10
- 0.8.3 — 2017-03-06
- 0.8.1 — 2017-03-04
- 0.7.18 — 2017-03-03
- 0.7.16 — 2017-03-03
- 0.7.15 — 2017-03-03
- … 35 more at https://npm.io/package/app-spec/versions

## README

# app-spec

Get application configuration from spec of required environment variables.

## Usage

We define environment dependencies and defaults via a `spec` file:
```javascript
module.exports = {
    description: 'Redis-based caching proxy for Google Maps API queries.',
    required: {
        redisHost: {
            description: 'the Redis host',
            default: 'localhost'
        },
        redisPort: {
            description: 'the Redis port',
            default: 6379
        }
    }
}
```

The application `index.js` passes the `spec` definition and `main` (entry-point) function to the application archetype.
```javascript
require('redis-koa-app-rpf')(require('./spec'), require('./main'));
```        

The application archetype uses this library to parse the `config` from `process.env` according to the `spec` and to invoke the `main` function.

## Used by

- https://github.com/evanx/redis-app
- https://github.com/evanx/redis-koa-app

<hr>

https://twitter.com/@evanxsummers

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