New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

simple-docker-webhook

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-docker-webhook

A simple webhook for docker

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Simple Webhook Github

This package is used to spin up a webserver to get POST requests from docker webhook.

Installing

npm install simple-docker-webhook

Examples - Simple

You can setup a simple webhook like this..

Typescript

import SimpleWebhook from "simple-docker-webhook";

const Port = 3000;
const webhook = new SimpleWebhook(Port);

webhook.on(response => {
    // Do something
})

JavaScript

const SimpleWebhook = require("simple-docker-webhook");

const Port = 3000;
const webhook = new SimpleWebhook.default(Port);

webhook.on(response => {
    // Do something
})

Examples - Express

You can also use express as an middleware

Typescript

import SimpleWebhook from "simple-docker-webhook";
import Express from "express";

const Port = 3000;
const app = Express();
const webhook = new SimpleWebhook(app);

webhook.on(response => {
    // Do something
})

app.listen(Port);

JavaScript

const SimpleWebhook = require("simple-docker-webhook");
const Express = require("express");

const Port = 3000;
const app = Express();
const webhook = new SimpleWebhook.default(app);

webhook.on(response => {
    // Do something
})

app.listen(Port);

Configurations

...
interface Options 
{
    /**
     * @param endpoint The endpoint for the webserver
     * @default /webhook
     */
    endpoint: string;
}
...

Keywords

webhook

FAQs

Package last updated on 22 Jun 2021

Did you know?

Socket

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.

Install

Related posts