{"id":19268961,"url":"https://github.com/stater/stater-boot","last_synced_at":"2026-05-12T12:41:57.938Z","repository":{"id":57162548,"uuid":"87027811","full_name":"stater/stater-boot","owner":"stater","description":"Micro Service Framework for NodeJS","archived":false,"fork":false,"pushed_at":"2018-02-16T15:00:50.000Z","size":81,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-02-12T18:09:49.166Z","etag":null,"topics":["microservice","microservice-framework","nodejs","nodejs-framework","nodejs-library","nodejs-modules"],"latest_commit_sha":null,"homepage":"https://boot.stater.io","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/stater.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":"2017-04-03T01:14:57.000Z","updated_at":"2017-04-12T18:42:14.000Z","dependencies_parsed_at":"2022-09-09T10:21:51.865Z","dependency_job_id":null,"html_url":"https://github.com/stater/stater-boot","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stater%2Fstater-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stater%2Fstater-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stater%2Fstater-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stater%2Fstater-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stater","download_url":"https://codeload.github.com/stater/stater-boot/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240310884,"owners_count":19781340,"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":["microservice","microservice-framework","nodejs","nodejs-framework","nodejs-library","nodejs-modules"],"created_at":"2024-11-09T20:17:54.509Z","updated_at":"2026-05-12T12:41:57.890Z","avatar_url":"https://github.com/stater.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stater Boot\n**`Micro Service Framework for NodeJS`** - A micro service manager that will help\nyou to create a new service by starting another services.\n\nThis framework is supposed to run any services with single command,\ne.g: run the build processes and then run the server, but\nthese services can access any service's configs, so will be\neasier to configure the services.\n\n### Requirements\n* NodeJS 7.8+\n\n***\n## Installation\n\n```bash\nnpm install -g @stater/boot\n```\n\nStater Boot will have `stater-boot` and `stb` as alias on the CLI.\n\n***\n## Usage\n\nTo start using **`Stater Boot`**, you need to add\n`stater-boot` property to your `package.json`.\n\n**Example**\n```json\n{\n  \"name\": \"sample-service\",\n  \"version\": \"1.0.0\",\n  \"stater-boot\": {\n    \"main\": \"service.js\",\n    \"config\": \"configs/service-config.js\"\n  }\n}\n```\n\nThen you need to create a service as a bootstrap service.\n\n**Example**\n\n**`service.js`**\n```js\nclass SampleService {\n  beforeRun = ['sb-bower-list', 'sb-build-script'];\n  beforeEnd = ['sb-store-asset', 'sb-init-server', 'sb-start-server'];\n\n  // This function will be called when the service start,\n  // after starting the beforeRun services.\n  // The beforeEnd services will be started after this\n  // function called.\n  service(context, configs) {\n    let conf = configs.get('sb-server');\n\n    context.logs.info(`Server will be running on port ${conf.port}`);\n  }\n}\n\nmodule.exports = SampleService;\n```\n\n*The sample above is assume the services already installed,\nand the created service is to run these services.*\n\nThen you can create configs for the required services.\n\n**Example**\n**`service-config.js`**\n```js\nmodule.exports = [\n  {\n    // Config name is required.\n    name: 'sb-server',\n\n    // Your configs is here.\n    port: 8080,\n\n    // This function will be called after all configs registered,\n    // to allow you reconfigure your config that depends\n    // on something else.\n    reconfigure(config) {\n      if (process.argv.includes('--prod')) {\n        config.port = 80;\n      }\n    }\n  },\n  {\n    name: 'sb-bower-list',\n    cwd: 'bower_components'\n  }\n];\n```\n\nTo start the service, run this command:\n\n```bash\nstater-boot\n```\nor\n```bash\nstb\n```\n\nTo start specific services, include the service(s) name\nafter the command. Example:\n\n```bash\nstater-boot foo bar\n```\nor\n```bash\nstb foo bar\n```\n\n**Example using command and options**:\n\n```bash\nstb foo bar -d src -c configs/stb-configs.js --debug --erroff\n```\n\nFrom the sample above, it run services `foo` and `bar`,\nset the workding directory (`-d`) to `src` folder,\nand set the config file (`-c`) to `configs/stb-configs.js`,\nwith debug logging (`--debug`), and keep the services running\neven when some error happen (`--erroff`).\n\n\nFor more usage info, run this command:\n\n```bash\nstb help\n```\n\n---\n\n\u003e Detailed docs will come soon. Please check the **`test`** folder for example.\n\n***\n## Changelog\n\n### **`v1.1.0`** - Apr 11, 2017\n\n* Using NodeJS \u003e= 7.8\n\n### **`v1.0.4`** - Apr 11, 2017\n\n* Removing dist folder from repo.\n* Adding SourceMap support.\n* Adding support to start specific services from CLI.\n* Adding binary shorthand `stb` as `stater-boot`.\n* Improvements.\n\n### **`v1.0.3`** - Apr 5, 2017\n\n* Updating readme.\n* Adding working directory handler (`-d`).\n\n### **`v1.0.2`** - Apr 5, 2017\n\n* Fixing Service Loader.\n* Improve error handling.\n* Updating CLI Helper.\n* Adding Test.\n* Fixing CLI Help Info.\n\n### **`v1.0.1`** - Apr 5, 2017\n\n* Chnage the `read-cli` dependency to `@stater/read-cli`.\n\n### **`v1.0.0`** - Apr 5, 2017\n\n* Initial release.\n\n***\n## The MIT License **`(MIT)`**\n\nCopyright © 2017 Nanang Mahdaen El Agung\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstater%2Fstater-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstater%2Fstater-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstater%2Fstater-boot/lists"}