{"id":28076810,"url":"https://github.com/jaredhanson/node-servicelocator","last_synced_at":"2025-05-13T01:52:37.638Z","repository":{"id":57155946,"uuid":"11984485","full_name":"jaredhanson/node-servicelocator","owner":"jaredhanson","description":"Central location to register and locate services within a Node.js application.","archived":false,"fork":false,"pushed_at":"2013-08-08T19:49:28.000Z","size":128,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-13T01:52:35.486Z","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/jaredhanson.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":"2013-08-08T19:20:59.000Z","updated_at":"2024-12-27T12:03:43.000Z","dependencies_parsed_at":"2022-08-26T08:31:05.032Z","dependency_job_id":null,"html_url":"https://github.com/jaredhanson/node-servicelocator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fnode-servicelocator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fnode-servicelocator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fnode-servicelocator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fnode-servicelocator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredhanson","download_url":"https://codeload.github.com/jaredhanson/node-servicelocator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856623,"owners_count":21974576,"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":"2025-05-13T01:52:37.118Z","updated_at":"2025-05-13T01:52:37.625Z","avatar_url":"https://github.com/jaredhanson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# servicelocator\n\n[![Build](https://travis-ci.org/jaredhanson/node-servicelocator.png)](http://travis-ci.org/jaredhanson/node-servicelocator)\n[![Coverage](https://coveralls.io/repos/jaredhanson/node-servicelocator/badge.png)](https://coveralls.io/r/jaredhanson/node-servicelocator)\n[![Dependencies](https://david-dm.org/jaredhanson/node-servicelocator.png)](http://david-dm.org/jaredhanson/node-servicelocator)\n\n\nA central location to register and locate services within a Node.js application.\nThis module implements the [service locator pattern](http://en.wikipedia.org/wiki/Service_locator_pattern),\nas [detailed](http://martinfowler.com/articles/injection.html) by\n[Martin Fowler](http://martinfowler.com/).\n\n## Install\n\n    $ npm install servicelocator\n\n## Usage\n\n#### Register a Service\n\n```javascript\nvar locator = require('servicelocator');\n\nlocator.register('db', dbConnection);\n```\n\n#### Get a Service\n\n```javascript\nvar locator = require('servicelocator');\n\nvar dbConnection = locator.get('db');\n```\n\n## Related Modules\n\n- [notifications](https://github.com/jaredhanson/node-notifications) — a mechanism for dispatching notifications\n\n## Tests\n\n    $ npm install\n    $ npm test\n\n## Credits\n\n  - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2013 Jared Hanson \u003c[http://jaredhanson.net/](http://jaredhanson.net/)\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fnode-servicelocator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredhanson%2Fnode-servicelocator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fnode-servicelocator/lists"}