{"id":19490432,"url":"https://github.com/mostlyjs/mostly-poplarjs","last_synced_at":"2025-07-04T15:38:30.782Z","repository":{"id":57303072,"uuid":"89935936","full_name":"MostlyJS/mostly-poplarjs","owner":"MostlyJS","description":"MostlyJS microservice integration with poplarjs","archived":false,"fork":false,"pushed_at":"2018-07-16T08:21:41.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T11:18:26.952Z","etag":null,"topics":["microservice","poplarjs"],"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/MostlyJS.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":"2017-05-01T15:27:02.000Z","updated_at":"2018-07-16T08:21:42.000Z","dependencies_parsed_at":"2022-09-20T18:03:56.320Z","dependency_job_id":null,"html_url":"https://github.com/MostlyJS/mostly-poplarjs","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/MostlyJS%2Fmostly-poplarjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostlyJS%2Fmostly-poplarjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostlyJS%2Fmostly-poplarjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostlyJS%2Fmostly-poplarjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MostlyJS","download_url":"https://codeload.github.com/MostlyJS/mostly-poplarjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240738066,"owners_count":19849545,"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","poplarjs"],"created_at":"2024-11-10T21:13:00.188Z","updated_at":"2025-02-25T19:42:12.339Z","avatar_url":"https://github.com/MostlyJS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"MostlyJS with Poplarjs\n======================\n\n[![Build Status](https://travis-ci.org/mostlyjs/mostly-poplarjs.svg)](https://travis-ci.org/mostlyjs/mostly-poplarjs)\n\nThis module provides quick steps to create [MostlyJS](https://github.com/MostlyJS/mostly-node) microservices with [Poplarjs](https://github.com/poplarjs/poplar).\n\n# Usage\n\n## Installation\n\n```bash\nnpm install mostly-poplarjs\n```\n\n## Quick Example\n\nConvert your Poplarjs APIs into microservices is easy enough.\n\nYour existing Poplarjs code\n```javascript\n// dummy_api.js\nconst ApiBuilder = poplar.ApiBuilder;\nvar DummyApi = new ApiBuilder('dummies');\nDummyApi.define('info', {...});\n....\nmodule.exports = DummyApi;\n```\n\nWrapping it as standalone server\n```javascript\nconst nats = require('nats');\nconst mostly = require('mostly-node');\nconst poplar = require('mostly-poplarjs');\nconst dummyApi = require('./dummy_api');\n\nconst trans = new mostly(nats.connect());\ntrans.ready(() =\u003e {\n  var app = poplar.create(trans)\n    .use(dummyApi)\n    .handler();\n});\n```\n\nThat's all, the service will register itself with NATS and can be called remotely.\n\n## RESTful Gateway\n\nTo expose the service as RESTful api, you need only setup a simple express gateway server using [mostly-poplarjs-rest](https://github.com/MostlyJS/mostly-poplarjs-rest)\n\n# License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostlyjs%2Fmostly-poplarjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmostlyjs%2Fmostly-poplarjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostlyjs%2Fmostly-poplarjs/lists"}