Socket
Book a DemoInstallSign in
Socket

weave-core

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weave-core

Fachwerk microservice framework

0.5.0-rc.4
latest
npmnpm
Version published
Maintainers
1
Created
Source

npm version Maintainability npm version Downloads

Weave

Weave is a fast and easy to use microservice framework for NodeJS (>= v6.x).

Features

  • Service mixins
  • Multiple services per node
  • Request-reply concept
  • Event bus system
  • Supports middlewares
  • Pluggable transporters (NATS, Redis)
  • Automatic service discovery
  • Load balanced requests (round-robin, random)
  • No master/leader node
  • Distributed timeout handling with fallback response
  • Health monitoring, metrics & statistics

Installation

$ npm install weave-core --save

Quick start

This example shows you how to create a small service with an add action which can add two numbers.

const { Weave } = require('weave-core')

let broker = Weave({ logLevel: 'debug' })

broker.createService({
    name: 'math',
    actions: {
        add(ctx) {
            return Number(ctx.params.a) + Number(ctx.params.b)
        }
    }
});

broker.start()
    .then(() => {
        // Call service
        broker.call('math.add', { a: 5, b: 3 })
            .then(result => console.log('5 + 3 =', result))
            .catch(error => console.error(`Something went wrong! ${error.message}`))
    })

Sample applications

There are a number of sample applications available:

    // todo

Documentation

Comming soon

Changelog

See changelog.md.

Roadmap

See roadmap.md.

License

The weave framework is available under the MIT license.

Contact

Copyright (c) 2018 by Fachwerk

FAQs

Package last updated on 12 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.