Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@geek/config

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@geek/config

Geek Configuration Manager for Node.js - The complete solution for managing config settings for your Node.js application

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-28.57%
Maintainers
2
Weekly downloads
 
Created
Source

@geek/config

@geek/config

Geek Configuration Manager for Node.js - The complete solution for managing config settings for your Node.js application

🚀 Getting Started

Install

Install @geek/config

$ npm install @geek/config

Priority of config files

| priority | source | example | location | |:-: |:-: |:-: |:-: |:-: | | 1. | process.env | MYAPP_MYPROPERTY="Some value" | environment variable | | 2. | overrides | | parameter: overrides | | 3. | user environment config file | myapp.dev.user.json | project directory | | 4. | user config file | myapp.user.json | project directory | | 5. | project environment config file | myapp.dev.project.json | project directory | | 6. | project config file | myapp.project.json | project directory | | 7. | global environment config file | myapp.dev.global.json | home config directory | | 8. | global config file | myapp.global.json | home config directory | | 9. | default values | | parameter: defaults |

Examples

if no parameters are passed in

  • process.env
  • manual overrides
  • myapp.user.json
  • myapp.project.json
  • myapp.global.json
  • default values

if passed in environment only: --environment dev

  • process.env
  • manual overrides
  • myapp.dev.user.json
  • myapp.user.json
  • myapp.dev.project.json
  • myapp.project.json
  • myapp.dev.global.json
  • myapp.global.json
  • default values

if passed in: --local-only

  • process.env
  • manual overrides
  • myapp.dev.user.json
  • myapp.user.json
  • myapp.dev.project.json
  • myapp.project.json
  • default values

if passed in specific config file: --config mytest.json (with no environment specified)

  • process.env
  • manual overrides
  • mytest.json
  • myapp.user.json
  • myapp.project.json
  • myapp.global.json
  • default values

if passed in specific config file: --config mytest.json --environment dev

  • process.env
  • manual overrides
  • mytest.json
  • myapp.dev.user.json
  • myapp.user.json
  • myapp.dev.project.json
  • myapp.project.json
  • myapp.dev.global.json
  • myapp.global.json
  • default values

if passed in: --only mytest.json

  • process.env
  • manual overrides
  • mytest.json
  • default values

📚Learn More

📣 Feedback

Have an idea or a comment? Join in the conversation here!

Keywords

FAQs

Package last updated on 27 Aug 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