{"id":22428230,"url":"https://github.com/technicallyjosh/node-config-live","last_synced_at":"2025-10-13T05:45:18.444Z","repository":{"id":57205431,"uuid":"60560352","full_name":"technicallyjosh/node-config-live","owner":"technicallyjosh","description":"Live updating and management of config across your stack in NodeJS.","archived":false,"fork":false,"pushed_at":"2016-06-11T22:15:05.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T11:43:20.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technicallyjosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-06T20:56:47.000Z","updated_at":"2018-05-11T01:53:06.000Z","dependencies_parsed_at":"2022-09-18T01:32:29.614Z","dependency_job_id":null,"html_url":"https://github.com/technicallyjosh/node-config-live","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicallyjosh%2Fnode-config-live","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicallyjosh%2Fnode-config-live/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicallyjosh%2Fnode-config-live/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicallyjosh%2Fnode-config-live/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technicallyjosh","download_url":"https://codeload.github.com/technicallyjosh/node-config-live/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245798537,"owners_count":20673901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T20:14:10.437Z","updated_at":"2025-10-13T05:45:13.422Z","avatar_url":"https://github.com/technicallyjosh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-config-live\n\n[![npm version](https://badge.fury.io/js/config-live.svg)](https://badge.fury.io/js/config-live) [![Build Status](https://travis-ci.org/technicallyjosh/node-config-live.svg?branch=master)](https://travis-ci.org/technicallyjosh/node-config-live) [![GitHub license](https://img.shields.io/badge/license-ISC-blue.svg)](https://raw.githubusercontent.com/technicallyjosh/node-config-live/master/LICENSE)\n\n# Introduction\n\nConfig-live takes away the pain of reloading your NodeJS applications when configurations change. It uses a simple implementation of external caching and pub/sub for updates.\n\nRight now config-live uses [Redis](http://redis.io) for it's caching of config key/values and pub/sub features. Bringing your own caching and pub/sub is in the works and will be implemented as addons.\n\nProps to Stack Overflow for their NFig package that has inspired this!\n\n**Important things to note:**\n* NodeJS 4+ required\n* No authentication is built in this package yet. e.g. username/password\n* This module assumes that you are on a **per environment setup**. *(One Redis instance per environment)*\n\n## Installation\n\n```\nnpm i -S config-live\n```\n\n## Example Usage\n\nUsing the [config](https://github.com/lorenwest/node-config) module.\n\n```js\nconst config     = require('config'); // if you are using config\nconst ConfigLive = require('config-live');\nconst configLive = new ConfigLive('localhost', 6379);\n\n// config is an object\nconfigLive.start(config);\n\nconfigLive.on('error', err =\u003e {\n    // DO SOMETHING. IT'S ON FIRE.\n});\n\nconfigLive.on('started', cfg =\u003e {\n    // since the config module is global, this is useful for a fully merged update\n    config.util.extendDeep(config, cfg);\n});\n\n// you can listen to the full updated config\nconfigLive.on('updated', cfg =\u003e {\n    // do something here?\n});\n\n// or you can listen to a specific simple key being updated\nconfigLive.on('mykey-updated', value =\u003e {\n    // can do something with new value\n});\n\n// or you can listen to a specific nested key being updated\nconfigLive.on('mykey.mysecondkey-updated', value =\u003e {\n    // can do something with new value\n});\n\n// single key set\nconfigLive.set('mykey', 'myvalue');\n\n// nested object key set\nconfigLive.set('mykey.mysecondkey', 'myvalue');\n```\n\n## Debugging\n\n```\nDEBUG=config-live* node myapp.js\n```\n\n**More documentation coming soon!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicallyjosh%2Fnode-config-live","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnicallyjosh%2Fnode-config-live","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicallyjosh%2Fnode-config-live/lists"}