
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
mattermost-api
Advanced tools
Mattermost api library for node.js. Get notification when error or message arrive.
mattermost-api library is used for track node js error in mattermost and also used for custom message
V1.0.1
npm install mattermost-api --save
var Mattermost = require("mattermost-api");
const express = require('express');
var app = express();
If you set mattermost_webhook_url error message will throw in error in webhook url's channel
app.use(Mattermost({
'url': 'mattermost_webhook_url',
'username': 'Username which display on your mattermost channel',
'icon_url':'URL',
'userid': 'userid',
'password': 'password',
'mattermosturl': 'your mattermost URL(Host)',
'channelid': 'channelid'
}));
For send custom message
Mattermost.sendmsg('your message');
If you want to use custom channel for send message pass option in second parameter url and username. If you pass this parameter library will use passed parameter other wise it will use set parameter for error.
Mattermost.sendmsg('your message', {
'url': 'mattermost_webhook_url',(optional or use set parameter for error)
'username': 'Username which display on your mattermost channel',(optional or use set parameter for error)
'icon_url':'URL'(optional if you want to diffrent icon then you set in error)
'image_url':'URL'(optional if you want to attach image)
});
For send message by user which you set for error message
Mattermost.sendmsgByUser('your message');
Also you can send message with diffrent user
Mattermost.sendmsgByUser('your message', {
userid: 'userid',(optional or use set parameter for error)
password: 'password',(optional or use set parameter for error)
mattermosturl: 'your mattermost URL',(optional or use set parameter for error)
channelid: 'channelid',(optional or use set parameter for error)
file: Buffer data, data must be Buffer (optional if you want to upload file)
filename: 'filename'(must use with file)
image_url:'URL'(optional if you want to attach image)
});
This project is licensed under the MIT License - see the license.md file for details
FAQs
Mattermost api library for node.js. Get notification when error or message arrive.
The npm package mattermost-api receives a total of 1 weekly downloads. As such, mattermost-api popularity was classified as not popular.
We found that mattermost-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.