Socket
Socket
Sign inDemoInstall

app-settings

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

app-settings

Really simple INI, JSON or YAML settings files for your application


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

app-settings

Simple access to settings for your node application

Travis CI

This is a simple module which gives access to a configuration file for a node application, either in YAML, JSON or INI format.

Install

Install with npm

npm install app-settings

YAML Example

settings.yml:

auth:
    username: mike
    password: mysecret

main.js:

var settings = require("app-settings");
console.log(settings.auth.username); // mike

INI Example

settings.ini:

[auth]
username = mike
password = mysecret

main.js:

var settings = require("app-settings");
console.log(settings.auth.username); // mike

JSON Example

settings.json:

{
    "auth": {
        "username": "mike",
        "password": "mysecret"
    }
}

main.js:

var settings = require("app-settings");
console.log(settings.auth.username); // mike

Custom Settings File

config.json:

{
    "auth": {
        "username": "mike",
        "password": "mysecret"
    }
}

main.js:

var config = require("app-settings")("config.json");
console.log(config.auth.username); // mike

License

CC0 (PUBLIC DOMAIN)

really, it's too simple to qualify for copyright, no?

FAQs

Package last updated on 15 Apr 2019

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