{"id":20364255,"url":"https://github.com/rvanasa/sorcerer","last_synced_at":"2026-05-02T17:37:04.929Z","repository":{"id":57366196,"uuid":"64620248","full_name":"rvanasa/sorcerer","owner":"rvanasa","description":"Simple Inversion-of-Control framework for NodeJS developers who like Java/Spring.","archived":false,"fork":false,"pushed_at":"2018-11-02T01:47:42.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T07:16:40.484Z","etag":null,"topics":["angularjs","dependency-injection","dependency-injection-framework","ioc","nodejs","organization","spring"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rvanasa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-31T23:07:57.000Z","updated_at":"2018-11-02T01:47:43.000Z","dependencies_parsed_at":"2022-08-23T20:10:37.485Z","dependency_job_id":null,"html_url":"https://github.com/rvanasa/sorcerer","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/rvanasa%2Fsorcerer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvanasa%2Fsorcerer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvanasa%2Fsorcerer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvanasa%2Fsorcerer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvanasa","download_url":"https://codeload.github.com/rvanasa/sorcerer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241904680,"owners_count":20040020,"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":["angularjs","dependency-injection","dependency-injection-framework","ioc","nodejs","organization","spring"],"created_at":"2024-11-15T00:10:44.544Z","updated_at":"2025-10-29T13:41:00.502Z","avatar_url":"https://github.com/rvanasa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## A super straightforward dependency injection library for Node.js, inspired by AngularJS and the Java Spring Framework.\n\n#### Example Project Layout\n```\n- src\n  - App.js\n  - Config.js\n  - util\n    - Decorator.js\n- index.js\n- sorcerer.config.js\n```\n\n#### /src/App.js\n```js\n// all files in the provided directory use this general format\nmodule.exports = function(Config)\n{\n\tvar app = {};\n\tconsole.log('Initialize some sort of app here');\n\treturn app;\n}\n```\n\n#### /src/Config.js\n```js\nmodule.exports = {\n\twhateverYouWantHere: 'yeah'\n}\n```\n\n#### /src/util/Decorator.js\n```js\nmodule.exports = function(App)\n{\n\t// this will evaluate since it is referencing an active resource\n\tApp.name = 'Decorated App';\n}\n```\n\n#### /sorcerer.config.js\n```js\nmodule.exports = {\n\tbasePath: __dirname, // default: execution directory\n\tverbose: true, // default: false (you can use strings/arrays to allow verbosity in specific environments)\n\tpackages: [{\n\t\tenv: 'production', // use specified env (process.env.NODE_ENV by default)\n\t\tpath: '/src', // you can also just pass the path string instead of a config object\n\t}, {\n\t\tname: 'globals', // optional\n\t\tinclude: { // note that you can use both `path` and `include` in the same package\n\t\t\tConfig: () =\u003e 'Some example resource',\n\t\t},\n\t}],\n};\n```\n\n#### /index.js\n```js\n\n// simple example (no config object)\nrequire('sorc')(__dirname + '/src', 'App');\n\n\n// using externalized config\nvar config = require('./sorcerer.config');\n\n// configure a directory\nrequire('sorc')(config, (App) =\u003e\n{\n\t// You can use any file as an entry point\n\tconsole.log(App);\n});\n\n// or, configure a directory with a specified environment\nrequire('sorc')(config, 'test', (App, Config) =\u003e\n{\n\tconsole.log(App, Config);\n});\n\n// or, configure a directory with error handling\nrequire('sorc')(config, (err, App) =\u003e\n{\n\tif(err) return console.error(err);\n\t\n\tconsole.log(App);\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvanasa%2Fsorcerer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvanasa%2Fsorcerer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvanasa%2Fsorcerer/lists"}