Skip to content
Moleculer addon that posts message to Typetalk.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test/unit
.eslintrc
.gitignore
.travis.yml
LICENSE
README.md
index.js
package-lock.json
package.json

README.md

Moleculer logo

moleculer-typetalk

Build Status npm version

Install

$ npm i --save moleculer-typetalk

Usage

const {ServiceBroker} = require("moleculer"),
    TypetalkService = require("moleculer-typetalk"),
    config = require("./config");

// Create broker
const broker = new ServiceBroker({logger: console});

// Load my service
broker.createService({
    mixins: [TypetalkService],
    name: "typetalk",
    settings: {
        token: config.token,
        topicID: config.topicID
    }
});

// Start server
broker.start().then(() => {
    broker
        .call("typetalk.post", {
            message: "Hello, Typetalk!"
        })
        .then(() => {
            // Do something...
        })
        .catch(() => {
            // Do something...
        });
});

For working example, see this repository.

Settings

Property Type Default Description
token String required Typetalk token.
topicID String required Topic ID to post to.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.