node package manager


Small server to fast run webhook server for GitHub and/or Slack.

How it works.


npm i --save webhook-github-n-slack

webhook function accept obj as argument with following structure:

import webhook from 'webhook-github-n-slack';
let config = {
    github: {
        path: '/webhook', //payload URL (http:/ 
        secret: '**********',
        projectRoot: '/var/www/vhosts/' //local path to project 
    slack: {
        url: '******/******/***********', //slack webhook URL 
        channel: 'development',
        projectName: 'name'
    port: 5254,
    exec: ['npm run restart', 'NODE_ENV=production webpack'], // pass any shell comand/s, it will run after function was execute by event or schedule  
    schedule: ['1d', '18:00'] 
    //first argument 'interval' has to be string as following: ```'12345(ms || s || m || h || d)'```, second, 'time' has to be string as following: ```'23:30'``` 
/* your server */ 

For scheduling we use schedule-js.

You can pass only Git, Slack or both configs together. Else if you pass schedule property it will schedule auto run of function each specified days and at specified time, besides webhook, for example to keep project up-to-date and avoid any local changes in project.

If you have any suggestion please leave me a message. ##### star to be up to date.