{"id":19324599,"url":"https://github.com/soarez/liveconf","last_synced_at":"2026-05-16T15:02:57.715Z","repository":{"id":4180777,"uuid":"5297543","full_name":"soarez/liveconf","owner":"soarez","description":"An npm module to allow live updates on JSON configuration files","archived":false,"fork":false,"pushed_at":"2012-10-08T14:47:49.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-18T03:14:55.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soarez.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":"2012-08-04T18:12:00.000Z","updated_at":"2013-09-28T16:29:20.000Z","dependencies_parsed_at":"2022-08-20T03:10:41.098Z","dependency_job_id":null,"html_url":"https://github.com/soarez/liveconf","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/soarez%2Fliveconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soarez%2Fliveconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soarez%2Fliveconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soarez%2Fliveconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soarez","download_url":"https://codeload.github.com/soarez/liveconf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240427271,"owners_count":19799471,"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-11-10T02:06:03.072Z","updated_at":"2026-05-16T15:02:52.689Z","avatar_url":"https://github.com/soarez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## liveconf\n\nA very simple and barebones configuration module. Just allows runtime configuration objects to be synced with JSON configuration files.\n\n**For a much more solid module on cofiguration, check out [node-config](https://github.com/lorenwest/node-config). **\n\n### Install\n\n    npm install liveconf\n\n### Use\n\nHave a configuration file with some configuration. e.g. `config.json`\n\n```json\n{\n   \"a\":8,\n   \"b\":\"foo\"\n}\n```\n\n```javascript\nvar liveconf = require('liveconf');\n\n// get the configuration from a file\nvar config = liveconf('config.json');\n\nconsole.log(config.b); // foo \n```\n\nThe configuration object will be cached and will always be the same for the same configuration file. The configuration file is watched so any changes are reflected on the object.\n\nWhile the code is running you can change the configuration.\n\n```json\n{\n   \"b\":\"bar\",\n   \"c\":42\n}\n```\n\n```javascript\nconsole.log(config.b); // bar\n```\n\n#### Events\n\nEach configuration object exposes an [EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter) through a non-enumerable readonly property `ee`. There is only one event `changed`, fired when the configuration object is changed.\n\n```javascript\nvar liveconf = require('liveconf');\nvar config = liveconf('config.json');\n\nconfig.ee.on('changed', function() {\n    // config file has changed\n});\n```\n\n### License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoarez%2Fliveconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoarez%2Fliveconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoarez%2Fliveconf/lists"}