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

packagesettings

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

packagesettings

Simple Runtime Settings and Config

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

PackageSettings

A package to manage the runtime settings of your project.

Let's say you have two servers that need the same project to be run on each but they need to be run on different ports. This package makes it easy to have the same code on each but the programs run with different settings.

var packageSettings = require('packagesettings');

// If no file is specified or the file doesn't contain a value for `port` then
// the value here will be used.
var defaults = {
  port: 8000
};

// If you have been given an argument when starting up treat it as the name
// of the settings file (in JSON format). If not then use `config.json` in
// the current directory.

if (process.argv.length === 3) {
  var config = packageSettings.init(defaults, process.argv[2], true);
} else {
  var config = packageSettings.init(defaults, __dirname + '/config.json', true);
}

Keywords

settings

FAQs

Package last updated on 26 Sep 2013

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