{"id":13651193,"url":"https://github.com/geut/moleculer-browser","last_synced_at":"2025-04-28T12:29:22.879Z","repository":{"id":67662672,"uuid":"198514450","full_name":"geut/moleculer-browser","owner":"geut","description":"Moleculer for the browser.","archived":false,"fork":false,"pushed_at":"2020-10-13T12:32:09.000Z","size":2818,"stargazers_count":30,"open_issues_count":1,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-18T16:17:12.446Z","etag":null,"topics":["browser","distributed","framework","microservice","microservices","moleculer","web"],"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/geut.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2019-07-23T22:00:56.000Z","updated_at":"2024-09-20T10:40:06.000Z","dependencies_parsed_at":"2023-02-22T15:00:33.639Z","dependency_job_id":null,"html_url":"https://github.com/geut/moleculer-browser","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":0.06382978723404253,"last_synced_commit":"4bc2152955da6080dc2e8191ebb78ed51944b86c"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geut%2Fmoleculer-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geut%2Fmoleculer-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geut%2Fmoleculer-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geut%2Fmoleculer-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geut","download_url":"https://codeload.github.com/geut/moleculer-browser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251313206,"owners_count":21569376,"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":["browser","distributed","framework","microservice","microservices","moleculer","web"],"created_at":"2024-08-02T02:00:46.259Z","updated_at":"2025-04-28T12:29:22.836Z","avatar_url":"https://github.com/geut.png","language":"JavaScript","funding_links":[],"categories":["Services"],"sub_categories":["Others"],"readme":"# moleculer-browser\n\n[![Build Status](https://travis-ci.com/geut/moleculer-browser.svg?branch=master)](https://travis-ci.com/geut/moleculer-browser)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n![stability-experimental](https://img.shields.io/badge/stability-experimental-orange.svg)\n\n\u003e [Moleculer](https://github.com/moleculerjs/moleculer) for the browser.\n\nmoleculer-browser is a wrapper on top of [Moleculer](https://github.com/moleculerjs/moleculer).\n\nMost of the 90% of the Moleculer's codebase is platform agnostic.\n\nUsing [rollup](https://rollupjs.org/) we replaced the specific code for Node.js with\nshims to simulate the original behaviour.\n\n## \u003ca name=\"install\"\u003e\u003c/a\u003e Install\n\n```\n$ npm install @geut/moleculer-browser\n```\n\n## \u003ca name=\"usage\"\u003e\u003c/a\u003e Usage\n\n```javascript\nconst { ServiceBroker } = require('@geut/moleculer-browser')\n\nconst broker = new ServiceBroker({\n  transporter: { type: 'fake' },\n  serializer: 'Json',\n  logger: console\n})\n\nbroker.createService({\n  name: 'math',\n  actions: {\n    add (ctx) {\n      return Number(ctx.params.a) + Number(ctx.params.b)\n    }\n  }\n})\n\nbroker.start()\n// Call service\n  .then(() =\u003e broker.call('math.add', { a: 5, b: 3 }))\n  .then(res =\u003e console.log('5 + 3 =', res))\n  .catch(err =\u003e console.error(`Error occured! ${err.message}`))\n```\n\n## \u003ca name=\"playground\"\u003e\u003c/a\u003e Playground\n\n### Glitch\n\n\u003c!-- View Source Button --\u003e\n\u003ca href=\"https://glitch.com/edit/#!/moleculer-browser\"\u003e\n  \u003cimg src=\"https://cdn.glitch.com/2bdfb3f8-05ef-4035-a06e-2043962a3a13%2Fview-source%402x.png?1513093958802\" alt=\"view source\" height=\"33\"\u003e\n\u003c/a\u003e\n\n\u003c!-- Remix Button --\u003e\n\u003ca href=\"https://glitch.com/edit/#!/remix/moleculer-browser\"\u003e\n  \u003cimg src=\"https://cdn.glitch.com/2bdfb3f8-05ef-4035-a06e-2043962a3a13%2Fremix%402x.png?1513093958726\" alt=\"remix this\" height=\"33\"\u003e\n\u003c/a\u003e\n\n### Codesandbox\n\n[![Edit moleculer-browser](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/moleculer-browser-1tk71?fontsize=14)\n\n## \u003ca name=\"why\"\u003e\u003c/a\u003e Why\n\nWhen we talk about services we think at some point in a process running in some environment. Well, the browser is a process too.\n\nWhat if the browser could provide a service itself through a network on top of WebSockets or WebRTC?\n\nThat's what we want to show here.\n\n## \u003ca name=\"issues\"\u003e\u003c/a\u003e Issues\n\n:bug: If you found an issue we encourage you to report it on [github](https://github.com/geut/moleculer-browser/issues). Please specify your OS and the actions to reproduce it.\n\n## \u003ca name=\"contribute\"\u003e\u003c/a\u003e Contributing\n\n:busts_in_silhouette: Ideas and contributions to the project are welcome. You must follow this [guideline](https://github.com/geut/moleculer-browser/blob/master/CONTRIBUTING.md).\n\n## License\n\nMIT © A [**GEUT**](http://geutstudio.com/) project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeut%2Fmoleculer-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeut%2Fmoleculer-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeut%2Fmoleculer-browser/lists"}