{"id":28448012,"url":"https://github.com/kmoskwiak/micrun","last_synced_at":"2026-05-13T20:34:14.658Z","repository":{"id":57296761,"uuid":"121972114","full_name":"kmoskwiak/micrun","owner":"kmoskwiak","description":"Fastly develop micro services in node.js","archived":false,"fork":false,"pushed_at":"2018-02-20T15:49:00.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T06:01:57.963Z","etag":null,"topics":["consul","microservice","nodejs","rpc","service"],"latest_commit_sha":null,"homepage":"","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/kmoskwiak.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":"2018-02-18T17:11:36.000Z","updated_at":"2023-03-07T03:26:59.000Z","dependencies_parsed_at":"2022-09-01T13:01:49.875Z","dependency_job_id":null,"html_url":"https://github.com/kmoskwiak/micrun","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kmoskwiak/micrun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmoskwiak%2Fmicrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmoskwiak%2Fmicrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmoskwiak%2Fmicrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmoskwiak%2Fmicrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kmoskwiak","download_url":"https://codeload.github.com/kmoskwiak/micrun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmoskwiak%2Fmicrun/sbom","scorecard":{"id":564158,"data":{"date":"2025-08-11","repo":{"name":"github.com/kmoskwiak/micrun","commit":"2b4ee0c4066afae14a730362c42dedfc8b9e4596"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-qh2h-chj9-jffq","Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-gmwp-3pwc-3j3g","Warn: Project is vulnerable to: GHSA-gwg9-rgvj-4h5j","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-x3m3-4wpv-5vgc","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T14:29:51.120Z","repository_id":57296761,"created_at":"2025-08-20T14:29:51.120Z","updated_at":"2025-08-20T14:29:51.120Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32999493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: 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":["consul","microservice","nodejs","rpc","service"],"created_at":"2025-06-06T12:08:33.826Z","updated_at":"2026-05-13T20:34:14.643Z","avatar_url":"https://github.com/kmoskwiak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# *micrun*\nFastly develop micro services in node.js\n\n[![Build Status](https://travis-ci.org/kmoskwiak/micrun.svg?branch=master)](https://travis-ci.org/kmoskwiak/micrun)\n\n## Features\n* build in [consul](https://www.consul.io/) support for KV store and health check\n* configuration can be stored in consul or locally\n\n## Install\n```bash\nnpm install micrun\n```\n\n## Usage\nExample usage without Consul\n```js\nconst micrun = require('micrun');\n\nmicrun.createServer({\n    port: 9000,\n    ip: '127.0.0.1',\n    useConsul: false,\n\n    postInterfacesDir: '\u003cpath to directory\u003e',\n    api_key: 'secret',\n\n    getInterfacesDir: '\u003cpath to directory\u003e'\n});\n```\n\nExample usage with Consul as a configuration store.\n```js\nconst micrun = require('micrun');\n\nmicrun.createServer({\n    useConsul: true,\n    consulNamespace: 'my-super-app'\n});\n```\n\n### Available options:\n\n|name               |description                                        |required                   |\n|----               |-------------------------------------              |--------                   |\n|port               |Port on which service will be running              | yes                       |\n|ip                 |IP of service                                      | yes                       |\n|useConsul          |if true Consul will be used as configuration store | no                        |\n|consulNamespace    |Name of directory in Consul KV store                | yes if using consul       |\n|consulConfig       |Optional configuration for consul ([details](https://github.com/silas/node-consul#consuloptions)) | no |\n|postInterfacesDir  |Path to directory where methods are stored          | no                        |\n|api_key            |API key for post methods                           | yes if using post methods |\n|getInterfacesDir   |Path to directory where methods are stored         | no                        |\n\n## Creating endpoints\nAll methods are grouped in interfaces, eg. there can be `getSingleUser` method in `users` interface. It could be exposed by service over HTTP GET or POST method.\n\n### Creating POST endpoints\n1. Create directory in your project, eg. `my-post-endpoints`\n2. In configuration of *micrun* pass absolute path to `my-post-endpoints` as `postInterfacesDir`. For POST methods `api_key` is also required.\n3. To create new interface create directory inside `my-post-endpoints`. Name of that directory will be also name of interface.\n4. Inside interface directory create `.js` file for every method. Name of the file must include word `Method`.\n\nFor example `getSingleUser` method in `users` interface will have file structure:\n```\nmy-post-interfaces\n├── users\n│   ├── getSingleUserMethod.js\n```\n\ngetSingleUserMethod.js must export object as below:\n```js\nconst configStore = require('micrun').config;\nconst config = configStore.getConfig(); // getConfig() can be used to retrieve configuration\n\nmodule.exports = {\n    name: 'getSingleUser', // This is the name of method used in service\n    method: function(params) { // This function must return Promise. Params are passed in POST body\n        return new Promise((resolve, reject) =\u003e {\n            // Do something and resolve promise\n\n            return resolve();\n        });\n    }\n};\n```\n#### Using POST endpoint\nMake a POST request to `http://\u003cip\u003e:\u003cport\u003e`\nWith JSON body:\n```json\n{\n    \"API_KEY\": \"\u003capi_key\u003e\",\n    \"interface\": \"\u003cinterface\u003e\",\n    \"method\": \"\u003cmethod\u003e\",\n    \"additional_data\": \"some_data\"\n}\n```\n\n### Creating GET endpoints\nCreating GET methods is similar to creating POST methods. In configuration of *micrun* pass absolute path to directory with GET interfaces as `getInterfacesDir`.\n\ngetSingleUserMethod.js as a GET method:\n```js\nmodule.exports = {\n    name: 'get_single_user', // This is the name of method used in service\n    method: function(req, res) { \n        return res.json({\n            // some data\n        });\n    }\n};\n```\n\n#### Using GET endpoint\nTo call GET method simply make request to: `http://\u003cip\u003e:\u003cport\u003e/:interface/:method\n\nEg. `http://127.0.0.1:9000/users/get_single_user`\n\n## Example\nExample [project](./example) using *micrun*.\n\n## Testing\n```\nnpm run test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmoskwiak%2Fmicrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkmoskwiak%2Fmicrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmoskwiak%2Fmicrun/lists"}