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:
;let config =github:autoGitPull: truebranch: "master"path: '/webhook' //payload URL (http:/domain.com:5254/webhook)secret: '**********'projectRoot: '/var/www/vhosts/domain.com/httpdocs' //local path to projectslack:url: '******/******/***********' //slack webhook URLchannel: 'development'projectName: 'name'port: 5254exec: 'npm run restart' 'NODE_ENV=production webpack' // pass any shell command/s, it will run after function was execute by event or schedule;.../* your server */...;
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.