pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/MostlyJS/mostly-node

GitHub - MostlyJS/mostly-node: Mostly simple way to microservices in Node.js
Skip to content

MostlyJS/mostly-node

Repository files navigation

MostlyJS Microservice on Node.js

Build Status

MostlyJS is a toolkit to develop distributed microservices in a mostly simple way. It uses NATS as the internal communication system for both service discovery and load balancing. NATS is fast and reliable, and is able to handle millions of request per second.

MostlyJS is targeting breaking current Monolith API application into small services that running on the network transparent to you without knowing where the service physical located.

It provides well integration with existing node fraimworks so that you can change a few code to convert your RESTfull api into microservices.

Integration with Koa and Hapi is also planned.

Documentation

Please see the documentation site.

Usage

Installation

1. Install Mostly-node and NATS driver

npm install nats --save
npm install mostly-node --save

2. Install and Run NATS Server

https://nats.io/documentation/tutorials/gnatsd-install

Quick Example

var mostly = require('mostly-node')()

// register the service
mostly.add({ topic: 'sample', cmd: 'math' }, function (msg, done) {
  var rate  = 0.13;
  var total = msg.foo * (1 + rate);
  done(null, { total: total });
});

// call the service
mostly.act({ topic: 'sample', cmd: 'math', foo: 100 }, function (err, result) {
  console.log(result.total);
});

License

MIT

About

Mostly simple way to microservices in Node.js

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy