cwd-config

1.0.2 • Public • Published

node-cwd-config

node configuration utility based on the current working directory of the process

Installation

npm install cwd-config

Usage

Add config files to a configs directory where you intend to start your node application.

If you use upstart or some other scheme that runs your node application from a script, make sure that the script changes directories before it starts node.

So, if your config file is: /configs/things.json

Then you can access it from any file with:

var cwdConfig = require('cwd-config'); var config = cwdConfig('things');

or

var config = require('cwd-config')('things');

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i cwd-config

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • ctarrington