Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moleculer

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moleculer - npm Package Versions

1
1012

0.8.2

Diff

Changelog

Source

0.8.2 (2017-07-06)

Fixes

  • fixed Redis cacher option resolver in ServiceBroker. Now it accepts connection string.

    const broker = new ServiceBroker({
        cacher: "redis://localhost"
    });
    

New

Validator updated

The fastest-validator is updated to v0.5.0. It supports multi rules & custom validators.


<a name="0.8.1"></a>

icebob
published 0.8.1 •

Changelog

Source

0.8.1 (2017-07-03)

New

icebob
published 0.8.0 •

Changelog

Source

0.8.0 (2017-06-21)

New

Project runner script

There is a new Moleculer project runner script in the bin folder. You can use it if you want to create small repos for services. In this case you needn't to create a ServiceBroker with options. Just create a moleculer.config.js or moleculer.config.json file in the root of repo fill it with your options and call the moleculer-runner within the NPM scripts. As an other solution you can put it to the environment variables instead of putting options to file.

Read more about runner

Shorthand for transporters, cachers and serializers in broker options

Some new resolvers are implemented in broker options to support shorthand configurations. This feature is enabled to load broker options easily from a JSON file or load from environment variables.

Usage for transporters

// Connect to the NATS default (localhost) server
const broker = new ServiceBroker({
    transporter: "NATS"
});

// Connect to a NATS server with connection string
const broker = new ServiceBroker({
    transporter: "nats://nats-server:4222"
});

// Connect to a NATS server with transporter options
const broker = new ServiceBroker({
    transporter: {
        type: "NATS",
        options: {
            prefix: "TEST",
            nats: {
                host: "nats-server",
                user: "admin",
                pass: "nats-pass"
            }
        }
    }
});

Usage for cachers

// Use a memory cacher
const broker = new ServiceBroker({
    cacher: true
    // or
    // cacher: "Memory"
});

// Use a Redis cacher with default options
const broker = new ServiceBroker({
    cacher: "Redis"
});

// Use a Redis cacher with options
const broker = new ServiceBroker({
    cacher: {
        type: "Redis",
        options: {
            ttl: 100
        }
    }
});

Usage for serializers

// Use the Avro serializer
const broker = new ServiceBroker({
    serializers: "Avro"
});

// Use the Protocol Buffer serializer
const broker = new ServiceBroker({
    serializers: {
        type: "ProtoBuf"
    }
});
icebob
published 0.7.9 •

icebob
published 0.7.8 •

icebob
published 0.7.7 •

icebob
published 0.7.6 •

icebob
published 0.7.5 •

icebob
published 0.7.4 •

icebob
published 0.7.3 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc