{"id":22679129,"url":"https://github.com/rajeshkumaravel/node-module-example","last_synced_at":"2026-04-29T19:31:26.342Z","repository":{"id":118906373,"uuid":"227057785","full_name":"rajeshkumaravel/node-module-example","owner":"rajeshkumaravel","description":"Demonstration for creating node module and using as dependency","archived":false,"fork":false,"pushed_at":"2019-12-10T09:22:41.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T20:43:17.593Z","etag":null,"topics":["local-dependency","node-local-dependency","node-module","node-module-link","nodejs"],"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/rajeshkumaravel.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-10T07:40:54.000Z","updated_at":"2019-12-10T09:24:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca7467cb-f656-487c-85cb-d75c175d7ab6","html_url":"https://github.com/rajeshkumaravel/node-module-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rajeshkumaravel/node-module-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajeshkumaravel%2Fnode-module-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajeshkumaravel%2Fnode-module-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajeshkumaravel%2Fnode-module-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajeshkumaravel%2Fnode-module-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajeshkumaravel","download_url":"https://codeload.github.com/rajeshkumaravel/node-module-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajeshkumaravel%2Fnode-module-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32440838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["local-dependency","node-local-dependency","node-module","node-module-link","nodejs"],"created_at":"2024-12-09T18:20:50.031Z","updated_at":"2026-04-29T19:31:26.325Z","avatar_url":"https://github.com/rajeshkumaravel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-module-example\nDemonstration for creating node module and using as dependency\n\n\n### Install colors module from project root directory\n\n``` javascript\nnpm install --save ../colors\n```\n\n### Verify package.json in project folder\n\n``` javascript\n\"dependencies\": {\n  \"colors\": \"file:../colors\"\n}\n```\n\n### Usage\n\n``` javascript\nconst colors = require('colors');\n\nconst _color = colors.getRandomColor();\nconsole.log(`Color name ${_color.name} and HTML code is ${_color.code}`);\n```\n\n### Linking a Local Module\n\nIf your local module is in heavy development, continually updating packages can be tedious. An alternative would be to link the modules. Linking a module ensures that any updates to the module are immediately reflected in the applications using it.\n\n* Uninstall local module from sampleProject\n  * ``` $ npm un colors ```\n* Create the global link\n  * ``` $ cd ../colors ```\n  * ``` $ sudo npm link ```\n* Once complete, shell will output\n  * ``` Output : /usr/local/lib/node_modules/colors -\u003e /home/USER/colors ```\n* Return to project folder and link the package\n  * ``` $ cd ../sampleProject ```\n  * ``` sudo npm link colors ```\n* Shell Output\n  * ``` Output : /home/USER/sampleProject/node_modules/colors -\u003e /usr/local/lib/node_modules/colors -\u003e /home/USER/colors ```\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajeshkumaravel%2Fnode-module-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajeshkumaravel%2Fnode-module-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajeshkumaravel%2Fnode-module-example/lists"}