https://github.com/is2ei/moleculer-typetalk
Moleculer addon that posts message to Typetalk.
https://github.com/is2ei/moleculer-typetalk
moleculer typetalk
Last synced: about 2 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 (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T17:34:24.000Z (over 2 years ago)
- Last Synced: 2025-01-12T05:28:46.746Z (3 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-typetalk
===[][travis]
[][coveralls]
[][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. |