New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

setty

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

setty

Configs management application

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Key/value configuration management

Setty is a small node configuration util, which help better manage key/value settings across different environments. Depends on nconf.

Installation

Installing the module

npm install setty --save-dev

Usage exampple:

var setty = require('setty');
var path = require('path');

setty.load({
      profileEnv: 'SETTY_PROFILE',
      profile: '.config', // Default value
      configFileName: 'config.json', // Default value
      settingsDir: path.join(__dirname, 'settings')
    });
    
//Reading settings
var connection = setty.get('connection');

//Reading nested settings
var connection = setty.get('facebook:token');

Profile can be specified in config file (.config by default) or via environment variable SETTY_PROFILE (name can be changed).

Example settings folder structure:

settings
 andrew
  config.json
 production
  config.json
 tests
  client
   config.json
  server
   config.json
 config.json
 .config
 .config-test

Running tests

npm test

Keywords

config

FAQs

Package last updated on 23 Apr 2015

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