Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/is2ei/moleculer-typetalk
Moleculer addon that posts message to Typetalk.
https://github.com/is2ei/moleculer-typetalk
moleculer typetalk
Last synced: 3 months ago
JSON representation
Moleculer addon that posts message to Typetalk.
- Host: GitHub
- URL: https://github.com/is2ei/moleculer-typetalk
- Owner: is2ei
- License: mit
- Created: 2019-03-03T07:39:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T17:34:24.000Z (almost 2 years ago)
- Last Synced: 2024-06-16T21:35:01.084Z (5 months ago)
- Topics: moleculer, typetalk
- Language: JavaScript
- Homepage: https://www.typetalk.com
- Size: 476 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-moleculer - moleculer-typetalk - Send Messages to [Typetalk](https://www.typetalk.com) (Services / General)
README
![Moleculer logo](http://moleculer.services/images/banner.png)
moleculer-typetalk
===[![Build Status](https://img.shields.io/travis/com/is2ei/moleculer-typetalk/master.svg?style=flat-square)][travis]
[![Coverage Status](https://coveralls.io/repos/github/is2ei/moleculer-typetalk/badge.svg?branch=master)][coveralls]
[![npm version](https://img.shields.io/npm/v/moleculer-typetalk.svg?style=flat-square)][npm][travis]: https://travis-ci.com/is2ei/moleculer-typetalk
[coveralls]: https://coveralls.io/github/is2ei/moleculer-typetalk?branch=master
[npm]: https://badge.fury.io/js/moleculer-typetalk## Install
```
$ npm i --save moleculer-typetalk
```## Usage
```javascript
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](https://github.com/is2ei/moleculer-typetalk-example).
## Settings
| Property | Type | Default | Description |
| -------- | ---- | ------- | ----------- |
| token | String | required | Typetalk token. |
| topicID | String | required | Topic ID to post to. |