Skip to content

Instantly share code, notes, and snippets.

const ErrorStackParser = require('error-stack-parser')
const Slack = require('slack-node')
const config = require('../config')
const packageJson = require('../../package.json')
const slack = new Slack()
slack.setWebhook(config.slackHookUrl)
module.exports = (err, req, res, next) => {
const options = {
stats: 'my_app.node_api',
response_code: true,
tags: ['my_app:node_api']
}
app.use(require('connect-datadog')(options))
@nicgirault
nicgirault / index.js
Last active February 24, 2018 15:44
Visualise dependencies updates in Slack #techdebtviz #slack
const npmCheck = require('npm-check')
const states = [
{
title: '🤔 Major update available',
filter: item => item.bump === 'major',
text: item => `${item.moduleName}: ${item.installed} → ${item.latest}`,
color: 'danger'
},
{
@nicgirault
nicgirault / index.js
Created July 4, 2018 21:58
What could be react-circos
import Circos, { Heatmap, Line } from 'react-circos'
const MyCircos = () => (
<Circos>
<Heatmap data={heatmapData} />
<Line data={lineData} />
</Circos>
)
import {Response, NextFunction} from 'express'
interface SomeRequest {
body: {
data: number[]
}
}
const someRouteHandler = (req: SomeRequest, res: Response, next: NextFunction) => {