New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

app-spec

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-spec

Get application configuration from spec of required environment variables.

  • 0.11.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
83
decreased by-6.74%
Maintainers
1
Weekly downloads
 
Created
Source

app-spec

Get application configuration from spec of required environment variables.

Usage

We define environment dependencies and defaults via a spec file:

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.

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

https://twitter.com/@evanxsummers

FAQs

Package last updated on 18 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc