Have ideas to improve npm?Join in the discussion! ¬Ľ

    local-config

    0.1.0¬†‚Äʬ†Public¬†‚Äʬ†Published

    local config

    require your local config file easily from anywhere in your project without having to navigate directories.

    painful

        var config = require('../../../../config');

    the local config way

        var config = require('local-config');

    Installation

    npm install local-config
    

    Usage

    Create a config.js or config.json file in your project root. Or you can create config/ folder (with an index.js or package.json file).

    JSON files are imported as plain JavaScript objects, .js files should export your config in the format which you would prefer.

    Example

    config.js

        module.exports = {
            environment: 'live',
            password: 'y0uW0ntGu355'
        }

    Keywords

    none

    Install

    npm i local-config

    DownloadsWeekly Downloads

    14

    Version

    0.1.0

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • avatar